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

# Pixels

> Client-side pixel tracking for Meta, TikTok, GA4, GTM, and more

# Pixel Tracking

TagadaPay handles **client-side pixel tracking** for your store. When you configure pixels in the dashboard, they're automatically loaded and fired at the right moments during the checkout flow — no extra code needed.

<Info>
  Pixel tracking is **not** the same as analytics. Pixels fire client-side events to ad platforms (Meta, TikTok, etc.) for attribution and retargeting. Analytics (dashboards, reports, conversion metrics) is a separate feature in the TagadaPay CRM.
</Info>

***

## How It Works

1. You configure pixel IDs in the TagadaPay dashboard (Settings → Integrations)
2. TagadaPay injects the pixel scripts into checkout sessions automatically
3. E-commerce events (PageView, AddToCart, Purchase, etc.) fire to all active pixels at the right moments

**No SDK code required for standard checkout flows.** Pixels are platform-managed.

***

## Supported Pixels

| Platform                            | Config Key                                              | What fires                                                                          |
| ----------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| **Meta (Facebook)**                 | Meta Pixel ID                                           | PageView, ViewContent, AddToCart, InitiateCheckout, Purchase                        |
| **TikTok**                          | TikTok Pixel ID                                         | page, ViewContent, AddToCart, InitiateCheckout, Purchase                            |
| **Google (GTM / GA4 / Google Ads)** | Container ID — `GTM-XXXXXX`, `G-XXXXXX`, or `AW-XXXXXX` | All events pushed to `dataLayer` (GTM) or via `gtag('event', …)` (GA4 / Google Ads) |
| **Snapchat**                        | Snap Pixel ID                                           | PAGE\_VIEW, VIEW\_CONTENT, ADD\_CART, START\_CHECKOUT, PURCHASE                     |
| **Pinterest**                       | Pinterest Tag ID                                        | pagevisit, viewcategory, addtocart, checkout, purchase                              |

<Note>
  **One Google row, three products.** The "Google" pixel slot accepts any of three
  ID formats — TagadaPay auto-detects which Google product to load based on the
  prefix:

  * `GTM-XXXXXX` → Google Tag Manager. TagadaPay loads `gtm.js` and pushes events
    to `dataLayer`. Configure GA4 / Ads conversion tags inside your GTM container.
  * `G-XXXXXX` → Google Analytics 4. TagadaPay loads `gtag.js` directly and fires
    events via `gtag('event', 'purchase', { value, currency, items })`.
  * `AW-XXXXXX` → Google Ads. Same `gtag.js` loader; conversion `send_to` is
    handled per-event when configured in the dashboard.

  No separate "GA4" or "Google Ads" provider exists — they all live behind the
  same `gtm` config slot in the SDK. If you have both a GTM container and a
  direct GA4 measurement ID, add them as two separate Google entries.
</Note>

***

## Configure Pixels

In the TagadaPay dashboard:

```
Settings → Integrations → Add pixel
```

Select the platform, paste your pixel ID, and save. TagadaPay handles the rest — script injection, event mapping, and deduplication.

***

## Event Mapping

TagadaPay fires these standard e-commerce events and maps them to each pixel's native event format:

| Event            | When it fires      | Meta (fbq)         | TikTok (ttq)       | GTM dataLayer      | GA4 (gtag)         |
| ---------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| PageView         | Page load          | `PageView`         | `page()`           | `PageView`         | `page_view`        |
| ViewContent      | Product viewed     | `ViewContent`      | `ViewContent`      | `ViewContent`      | `view_item`        |
| AddToCart        | Item added to cart | `AddToCart`        | `AddToCart`        | `AddToCart`        | `add_to_cart`      |
| InitiateCheckout | Checkout started   | `InitiateCheckout` | `InitiateCheckout` | `InitiateCheckout` | `begin_checkout`   |
| AddPaymentInfo   | Card info entered  | `AddPaymentInfo`   | `AddPaymentInfo`   | `AddPaymentInfo`   | `add_payment_info` |
| Purchase         | Payment succeeded  | `Purchase`         | `Purchase`         | `Purchase`         | `purchase`         |

All purchase events are **deduplicated** — they won't fire twice for the same order, even if the customer refreshes the thank-you page.

***

## Funnel Step Tracking

TagadaPay also tracks funnel step progression for conversion reporting in the CRM dashboard. This happens automatically when using TagadaPay-hosted funnels or the checkout session flow.

***

## Custom Pixel Configuration (Advanced)

If you're building a fully headless store and need to fire pixel events yourself, configure your pixel IDs in the TagadaPay dashboard (Settings → Integrations) or via the Node SDK's store settings.

The `CheckoutSession` returned by `loadSession()` does **not** contain pixel config — pixel IDs are a store-level setting, not a session-level one.

```typescript theme={null}
// Pixel IDs come from your store config (dashboard or Node SDK), not from the session.
// Use the native pixel SDKs directly with your configured IDs:
// fbq('track', 'Purchase', { value: 49.00, currency: 'USD' });
// ttq.track('Purchase', { value: 49.00, currency: 'USD' });
```

<Note>
  For headless stores, you manage pixel script injection yourself using the pixel IDs from the TagadaPay dashboard or your store's settings via the Node SDK. TagadaPay provides the configuration — you control when and how scripts load.
</Note>
