The LogRocket Integration

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.

In this section


Setting up the LogRocket integration

  1. Head to your Delighted Web survey customization page
  2. If you haven't already, customize your Web survey
  3. On the following page, click on Show your code snippet
  4. Copy the code snippet (Make sure your Web survey is turned on)
  5. Install the code snippet into any page where you've also installed LogRocket
  6. LogRocket will begin automatically capturing any responses to Delighted surveys

Back to top


FAQs: LogRocket

In this section

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

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us