LogRocket Integration

In this article:

FAQs

Suggested next article: Core Training & Certification


LogRocket integration overview

Delighted’s LogRocket integration will automatically capture responses occurring during LogRocket sessions, as well as make that data accessible in various areas of the LogRocket UI.

Web platform only

LogRocket's integration captures feedback for Web surveys only at the moment. For more detail on how Delighted's Web survey and LogRocket interact, please review the rest of this article.

Back to top


Setting up the LogRocket integration

1
Select the "Integrations" tab
2
Click on the "LogRocket" tile
3
Click the link to go directly to your Delighted Web survey customization page

Be sure to customize your Web survey first!

If you haven't already, customize your Web survey → then click "Next: Configure" followed by "Next: Add Snippet" to complete the configuration steps.

After you generate the code, copy your web snippet.  (Don't forget to "Turn on" your Web survey as well!)

4
If necessary, click on "Show your code snippet"
5
Copy the code snippet ( Again, make sure your Web survey is turned on)
6
Install the code snippet into any page where you've also installed LogRocket
7
LogRocket will begin automatically capturing any responses to Delighted surveys

Back to top


Can I sync the LogRocket session data back to Slack?

Yes. In order to capture LogRocket session data in your Slack notifications, we'll need to pull that session data into the survey request as a property. 

First, be sure to enable your Slack integration - including a rule that captures All Responses.

Once that's set-up, initiate your Delighted survey in a LogRocket.getSessionURL() callback after initializing LogRocket in your app (LogRocket.init()). Attach the sessionURL as a survey property. Here's an example:

	LogRocket.getSessionURL(sessionURL => {
  const delightedScript = document.createElement('script');
  delightedScript.setAttribute('type', 'text/javascript');
  delightedScript.innerHTML =`
    !function (e, t, r, n) { if (!e[n]) { for (var a = e[n] = [], i = ["survey", "reset", "config", "init", "set", "get", "event", "identify", "track", "page", "screen", "group", "alias"], s = 0; s < i.length; s++) { var c = i[s]; a[c] = a[c] || function (e) { return function () { var t = Array.prototype.slice.call(arguments); a.push([e, t]) } }(c) } a.SNIPPET_VERSION = "1.0.1"; var o = t.createElement("script"); o.type = "text/javascript", o.async = !0, o.src = "https://d2yyd1h5u9mauk.cloudfront.net/integrations/web/v1/library/" + r + "/" + n + ".js"; var p = t.getElementsByTagName("script")[0]; p.parentNode.insertBefore(o, p) } }(window, document, "O2GdV8QiTw0TmYqF", "delighted");
    delighted.survey({ properties: { logrocketSession: '${sessionURL}', logrocketSession_url: '${sessionURL}' } });
  `;
  document.body.appendChild(delightedScript);
});

When setting up the above configuration, be sure to send the sessionURL as both logrocketSession and logrocketSession_url. When both properties are passed together, Delighted will automatically hyperlink the session details in Slack, making it easy to jump directly to the user's session in LogRocket. If both parameters are not passed, the text will come through as a plain string.

Once you’ve made this code change, navigate to your Delighted dashboard and add a “Logrocket Session” survey response filter:

You're all set! Slack notifications will now include LogRocket session information whenever applicable!

Back to top


Where can I see the Delighted response data in LogRocket?

You can find the Delighted response data in two different areas of your LogRocket account:

NPS Filter

Within LogRocket's main filter dropdown, you will see a filter labeled 'NPS' (Note: This is available for customers on LogRocket's Professional plan only). You can use this filter to search for specific sessions in which an NPS survey has been submitted matching the relevant value.

Session playback display

If you're watching a LogRocket session in which an NPS survey from Delighted was submitted, you'll be able to see the relevant NPS score recorded as part of the details section along the righthand panel of the Playback view in the 'Session details' section.

Back to top


Can I remove the LogRocket session URL from the response?

Yes!

Details about removing session information can be found here on the LogRocket help center.

Back to top


Still need help? Contact Us Contact Us