> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.omni.co/feedback

```json
{
  "path": "/embed/admin/integrations",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Configuring embed integrations

> Configure third-party integrations like FullStory and LogRocket for your embedded Omni instance.

<Note>
  Reach out to Omni support to have this feature enabled.
</Note>

The **Settings > Embed > Admin** tab allows you to configure third-party integrations for your embedded Omni instance. These integrations enable advanced monitoring, session recording, and analytics capabilities for your embedded content.

When an integration is configured:

* The integration's tracking script is loaded when users access your embedded Omni content
* Session data and user interactions are sent to the configured integration service

## Supported integrations

Omni supports the following embed integrations:

* **FullStory** - Session recording and analytics platform that captures user interactions
* **LogRocket** - Session replay and analytics tool for debugging and understanding user behavior

## Requirements

To configure embed integrations, you'll need:

* **Organization Admin** permissions
* To have the **Embed integrations** feature enabled in your Omni instance
* Valid credentials for the integration service you want to configure

## Configuring an integration

To configure a new embed integration:

<Steps>
  <Step title="Set up your embedding application" titleSize="h3">
    Complete the setup for your integration. Click a tab to view instructions for a specific integration.

    <AccordionGroup>
      <Accordion title="FullStory">
        In order for FullStory to include an Omni iframe in session recordings, the embedding application needs to do the following:

        * Initiate FullStory
        * Send an `integration:enable` event with `payload.name "fullstory"`

        ```javascript expandable wrap theme={null}
        // Using FullStory sdk
        import { FullStory, init } from '@fullstory/browser';

        export default function Index() {
          const [url1]: string = useLoaderData();
          const [omniReady, setOmniReady] = useState(false)

          // Listen for events from Omni.
          useEffect(() => {
            const listener = async (event: MessageEvent) => {
              switch (event.data.name) {
                // When a page:changed event is emitted from Omni, we can assume the Omni iframe is loaded
                // and ready to receive events from the parent page.
                case "page:changed": {
                  setOmniReady(true);
                  break;
                }
              }
            };
            window.addEventListener("message", listener);
          }, []);

          // Send integration:enable event to Omni when ready and initialize FullStory.
          useEffect(() => {
            if (omniReady) {
              // Send integration:enable event to Omni via postMessage to iframe.
              document
                .querySelector("iframe")
                ?.contentWindow?.postMessage(
                  {
                    name: 'integration:enable',
                    payload: { name: 'fullstory' }, // Payload must include name: 'fullstory'
                  },
                  '*'
                );

              // Initialize FullStory
              init({ orgId: '[YOUR_FULLSTORY_ORG_ID]' }, () => {
                // Note: Unlike LogRocket, FullStory requires the parent application
                // handle identification.
                FullStory('setIdentity', {
                  properties: {
                    displayName: '[YOUR_TRACKED_USERS_NAME]',
                  },
                  uid: '[YOUR_TRACKED_USERS_UID]',
                  })
              });
            }
          }, [omniReady]);

          return (
            <div
              style={{
                fontFamily: "system-ui, sans-serif",
                lineHeight: "1.8",
                width: "100%",
                height: "100%",
              }}
            >
              <iframe src={url1} width={"100%"} height={"800px"} />
            </div>
          );
        }
        ```
      </Accordion>

      <Accordion title="LogRocket">
        <Note>
          Omni automatically identifies embed users in LogRocket using their associated external ID, name, and email.
        </Note>

        In order for LogRocket to include an Omni iframe in session recordings, the embedding application needs to do the following:

        * Initiate LogRocket
        * Send an `integration:enable` event with `payload.name "logrocket"`

        ```javascript expandable wrap theme={null}
        // Import LogRocket sdk
        import LogRocket from "logrocket";

        export default function Index() {
          // Embed URL from server
          const [url1]: string = useLoaderData();
          const [omniReady, setOmniReady] = useState(false)

          // Add Omni event listener.
          useEffect(() => {
            const listener = async (event: MessageEvent) => {
              switch (event.data.name) {
                // When a page:changed event is emitted from Omni, we can assume the Omni iframe is loaded
                // and ready to receive events from the parent page.
                case "page:changed": {
                  setOmniReady(true);
                  break;
                }
              }
            };
            window.addEventListener("message", listener);
          }, []);

          // Send integration:enable event to Omni when ready and initiate LogRocket.
          useEffect(() => {
            // Wait for the Omni iframe to load before sending the `integration:enable` event.
            if (omniReady) {
              document
                .querySelector("iframe")
                ?.contentWindow?.postMessage(
                  {
                    name: "integration:enable",
                    payload: { name: 'logrocket', parentDomain: "[YOUR_PARENT_APPLICATION_DOMAIN]" }, // standard payload for enabling LogRocket
                  },
                  '*'
                );

              // Initiate LogRocket
              // Note: The mergeIframes and childDomains parameters are necessary to
              // make sure Omni iframes are included in session.
              LogRocket.init('[YOUR_LOGROCKET_APP_ID]', {
                mergeIframes: true,
                childDomains: ["[YOUR_OMNI_EMBED_DOMAIN]"]
              });
            }
          }, [omniReady]);

          return (
            <div
              style={{
                fontFamily: "system-ui, sans-serif",
                lineHeight: "1.8",
                width: "100%",
                height: "100%",
              }}
            >
              <iframe src={url1} width={"100%"} height={"800px"} />
            </div>
          );
        }
        ```
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Configure the integration in Omni" titleSize="h3">
    1. Navigate to **Settings > Embed > Admin** in your Omni instance.
    2. Scroll to the **Integrations** section.
    3. Enter the required information for the integration:

       * **FullStory** - Enter your FullStory organization ID in the **Org ID** field
       * **LogRocket** - Enter your LogRocket app ID in the **App ID** field
    4. Click **Save** to apply the configuration.
  </Step>
</Steps>

Once configured, the integration will be active for all users accessing your embedded Omni instance.

## Removing an integration

<Note>
  Removing an integration will disable it for all new embed sessions. Existing sessions may continue to send data to the integration until the session expires.
</Note>

To remove an integration configuration:

1. Navigate to **Settings > Embed > Admin** in your Omni instance.
2. Scroll to the **Integrations** section.
3. Click the **Clear** button for the integration.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Embed integrations not visible in Omni">
    Embed integrations are a feature that must be enabled by Omni support. Reach out to support to request access.
  </Accordion>

  <Accordion title="Visualizations not rendering in FullStory">
    Support for [canvas rendering](https://help.fullstory.com/hc/en-us/articles/360020623094-Does-Fullstory-work-with-my-complex-site#h_01HMWCNWPDKH2M67SWXTPSZJYF), which is required to render Omni visualizations, is limited and may require a paid FullStory plan.
  </Accordion>
</AccordionGroup>

## Next steps

* [Manage embed secrets](/embed/admin/secrets)
* [View and impersonate embed users](/embed/admin/users)
* [View embed sessions](/embed/admin/sessions)
