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

# Generic Embed analytics

> Send Trylora success events to analytics providers already available on the storefront page.

The Generic Embed can send successful image and animation events to GA4, Google Tag Manager, or Mixpanel when the corresponding provider is already available on the storefront page.

## Enable merchant analytics

In the Trylora dashboard:

1. Open the store's **Settings** tab.
2. Find **Analytics**.
3. Turn on **Enable merchant analytics**.
4. Turn on only the destinations that exist on the storefront.
5. Select **Save Store Settings**.

## Provider requirements

### Google Analytics 4

Enable **Google Analytics 4** when the page exposes `window.gtag`. Trylora calls:

```javascript theme={null}
gtag("event", "trylora_tryon_succeeded", {
  trylora_product_url: "https://shop.example.com/products/hero",
  trylora_product_title: "Hero Dress",
});
```

Animation results use `trylora_animation_succeeded`.

### Google Tag Manager

Enable **Google Tag Manager** when the page exposes `window.dataLayer` as an array. Trylora pushes:

```javascript theme={null}
dataLayer.push({
  event: "trylora_tryon_succeeded",
  trylora_product_url: "https://shop.example.com/products/hero",
  trylora_product_title: "Hero Dress",
});
```

Create GTM triggers and destination tags for the two Trylora event names.

### Mixpanel

Enable **Mixpanel** when the page exposes `window.mixpanel.track`. Trylora calls `mixpanel.track` with the event name and product payload.

<Warning>
  A destination toggle does not install that provider. If its page global is unavailable, Trylora skips that destination without blocking the shopper experience.
</Warning>

## Event timing

Trylora emits an event once when a new result transitions to ready during the current widget session. It does not emit for:

* A queued or running result
* A failed result
* A result that was already ready when event tracking initialized
* Browser extension mode

For the exact names and fields, see [Analytics events](/reference/analytics-events).

## Verify delivery

1. Confirm the provider is initialized before completing the try-on.
2. Complete a new image try-on.
3. Inspect the provider's debug or real-time view for `trylora_tryon_succeeded`.
4. Generate an animation and look for `trylora_animation_succeeded`.
5. Confirm `trylora_product_url` identifies the intended product.

If events do not appear, use [Troubleshooting](/reference/troubleshooting#analytics-events-do-not-appear).
