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

# Third-party analytics integrations

> Send ABConvert test assignments to your existing analytics tools without duplicating their browser SDKs or storefront events.

Use an analytics integration to add ABConvert test assignments to the tools you already use for behavioral analysis. ABConvert continues to calculate test results in its own analytics dashboard.

## Choose one SDK owner for each analytics tool

Install each vendor's browser SDK only once on a storefront. If the vendor offers both a Shopify app and a theme Browser SDK, choose one installation path before enabling its ABConvert integration.

<Warning>
  Do not run a Shopify app-owned SDK and a theme-owned SDK for the same
  analytics tool. Duplicate SDKs can send duplicate events and create
  conflicting device or session identities.
</Warning>

Choose the theme Browser SDK when you need a minimal, consent-controlled set of custom storefront events. Choose the vendor's Shopify app when its Shopify-native checkout and order events are the priority. Review the vendor's privacy, session replay, and identity settings before installing either option.

## Connect an analytics tool to ABConvert

<Steps>
  <Step title="Install the vendor SDK once">
    Add the vendor's Browser SDK through its selected Shopify app or your theme.
    Use the same analytics-consent rule that applies to the rest of your
    storefront tracking.
  </Step>

  <Step title="Enable the ABConvert integration">
    In ABConvert, open **Integrations** and enable the provider. ABConvert waits
    for the provider client before it sends an eligible test assignment.
  </Step>

  <Step title="Verify an eligible assignment">
    Use a short, scoped test or an existing eligible test. Confirm the expected
    assignment event in the provider's live-event or debugger view before
    relying on it for reporting.
  </Step>
</Steps>

## Set up Segment

<Steps>
  <Step title="Create a JavaScript source in Segment">
    In Segment, create a **JavaScript** source for your Shopify storefront. Add
    your storefront URL to the source settings, then copy its public write key.
    Keep the key in your theme configuration; do not add it to ABConvert.
  </Step>

  <Step title="Load Segment's Browser SDK once">
    Add the Segment Browser SDK to your Shopify theme and initialize it with the
    source write key. Load it only after the same analytics-consent check used
    by your other storefront tracking. Let Segment send the page event and any
    commerce events that you configure.
  </Step>

  <Step title="Enable Segment in ABConvert">
    In ABConvert, open **Integrations** and enable **Segment**. ABConvert uses
    the existing `analytics.track` client; it does not need a second Segment
    snippet or a Segment key.
  </Step>

  <Step title="Configure Segment destinations">
    Add destinations in Segment when you want to forward attribution to tools
    such as a product analytics or marketing platform. Configure each
    destination's event mapping in Segment.
  </Step>

  <Step title="Verify in Source Debugger">
    Visit a page where an active test is eligible, then open the JavaScript
    source's **Debugger** in Segment. Confirm both the page event and
    `Experiment Viewed` event appear.
  </Step>
</Steps>

<Note>
  If your Shopify app sends checkout and order events to Segment, it can run
  alongside the Browser SDK. Keep one browser-side Segment client. The app alone
  cannot send ABConvert test assignments because it does not expose
  `analytics.track` in the visitor's browser.
</Note>

## Segment event schema

When the Segment integration is enabled and Segment's Browser SDK has loaded, ABConvert sends one `Experiment Viewed` event for each eligible active test assignment.

| Property          | Description                    | Example               |
| ----------------- | ------------------------------ | --------------------- |
| `experiment_id`   | ABConvert test ID              | `1001`                |
| `experiment_name` | ABConvert test name            | `Homepage price test` |
| `variation_id`    | Test group index, sent as text | `0`                   |
| `variation_name`  | Test group name                | `Control`             |

Use these event properties to build Segment audiences or forward test attribution to configured destinations. Segment receives assignment context only; configure your Segment source and destinations separately for page views, cart events, checkout events, and purchases.

## Set up Amplitude

<Steps>
  <Step title="Create or select an Amplitude web project">
    In Amplitude, create or select the project that receives your Shopify
    storefront events. Copy its Browser SDK API key into your theme
    configuration; do not add it to ABConvert.
  </Step>

  <Step title="Load Amplitude's Browser SDK once">
    Add and initialize the Amplitude Browser SDK in your Shopify theme after
    analytics consent. If you use Amplitude's Shopify app for checkout and order
    events, keep that app as the only Amplitude browser-SDK owner.
  </Step>

  <Step title="Enable Amplitude in ABConvert">
    In ABConvert, open **Integrations** and enable **Amplitude**. ABConvert
    calls the existing `amplitude.track` client; it does not add another
    Amplitude snippet or expose your API key.
  </Step>

  <Step title="Verify an experiment exposure">
    Visit a page where an active test is eligible, then use Amplitude's live
    event view to confirm the `$exposure` event and its experiment properties.
  </Step>
</Steps>

### Amplitude event schema

ABConvert sends one `$exposure` event for each eligible active test assignment.

| Property   | Description          | Example               |
| ---------- | -------------------- | --------------------- |
| `flag_key` | ABConvert test name  | `Homepage price test` |
| `variant`  | ABConvert test group | `Control`             |

Amplitude uses this event to associate the visitor with the reported test
group. Keep your own page, cart, checkout, and purchase instrumentation in the
same single Amplitude SDK owner.

## Set up Mixpanel

<Steps>
  <Step title="Create or select a Mixpanel project">
    In Mixpanel, create or select the project that receives your Shopify
    storefront events. Initialize Mixpanel in your theme with its project token,
    after analytics consent.
  </Step>

  <Step title="Load Mixpanel's Browser SDK once">
    If a Mixpanel Shopify app owns your storefront SDK, use that app for the
    browser client and do not add a second theme snippet. Otherwise, initialize
    the Browser SDK in your theme and keep checkout/order instrumentation in
    that same owner.
  </Step>

  <Step title="Enable Mixpanel in ABConvert">
    In ABConvert, open **Integrations** and enable **Mixpanel**. ABConvert uses
    the existing `mixpanel.track` and `mixpanel.register_once` clients; it does
    not need another token or snippet.
  </Step>

  <Step title="Verify an experiment exposure">
    Visit a page where an active test is eligible, then confirm the
    `$experiment_started` event in Mixpanel's live event view.
  </Step>
</Steps>

### Mixpanel event schema

For each eligible active test assignment, ABConvert sends one
`$experiment_started` event and registers a durable per-test super property.

| Item                 | Description                | Example                                       |
| -------------------- | -------------------------- | --------------------------------------------- |
| `Experiment name`    | Event property: test name  | `Homepage price test`                         |
| `Variant name`       | Event property: test group | `Control`                                     |
| `[ABConvert] <name>` | Super property: test group | `[ABConvert] Homepage price test` = `Control` |

Use the event for Mixpanel's experiment reporting and the super property to
filter later Mixpanel events by the visitor's test group.

## Verify and troubleshoot

* The selected Browser SDK must load before ABConvert's assignment is available. If it loads after the readiness window, refresh and inspect your SDK loading order.
* Analytics consent and content blockers can prevent the vendor SDK from loading or sending an event.
* Verify receipt in the vendor's event debugger. ABConvert recognizing a client does not prove that the provider accepted the event.
* Keep ABConvert's analytics dashboard as the source for test statistics. Third-party analytics integrations provide attribution context for your broader reporting.
