LogRocket integration: show Userflow content in session replays

Prev Next

The LogRocket integration makes Userflow content (flows, checklists and the Resource Center) visible in LogRocket session replays. Without it, Userflow content shows up in replays as striped-out rectangles, because LogRocket doesn't read into Userflow's iframes.

LogRocket is a session replay, error tracking and product analytics tool.

Do I need a separate LogRocket integration for Staging and Production?

Yes. Each LogRocket integration connects one Userflow environment to one LogRocket project. We suggest a separate LogRocket project for each of your app's environments, matched to your Userflow environments, so Staging data doesn't mix with Production data. If you have both Staging and Production, run the setup once for each.

Prepare LogRocket in your app

LogRocket must already be installed in your app. If it isn't, see Settings → Project Setup in LogRocket.

  1. Add the mergeIframes: true option to the LogRocket.init call in your app:

    LogRocket.init(YOUR_APP_ID, {
      mergeIframes: true
    })
  2. If you installed LogRocket with npm, also expose the LogRocket object on window:

    import LogRocket from 'logrocket'
    
    window.LogRocket = LogRocket

    If you installed LogRocket with a script tag, skip this step.

Connect LogRocket to Userflow

  1. Sign in to Userflow and select the environment you want from the drop-down in the top-right corner.

  2. Go to Settings → Integrations.

  3. Click Add integration.

  4. Click LogRocket.

  5. Click Add LogRocket.

  6. In the LogRocket App ID field, enter the same app ID your app passes to LogRocket.init(YOUR_APP_ID).

  7. Click Save.

LogRocket setup screen in Userflow Settings → Integrations

Why don't some LogRocket sessions show Userflow content?

Userflow only starts LogRocket for users your app already runs LogRocket for. If your app doesn't start LogRocket for some users, for example admins, Userflow doesn't start it for them either.