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

# Tracking pixels

> Fire your Meta, Google and TikTok pixels on the PagAmerican checkout when a checkout starts and when a purchase is approved.

Tracking pixels report what happens on the PagAmerican checkout back to your ad platforms, so Meta, Google and TikTok can attribute conversions to your campaigns and optimize for them. You add the pixel ID once, and the checkout loads the pixel for every buyer who reaches it.

The mechanism: the pixel runs in the buyer's browser, on the checkout page. The checkout loads each of your pixels, records a page view, and then fires the events you enabled. Nothing is sent from the platform's servers, so the pixel depends on the buyer's browser loading it.

## Where you set up pixels

Pixels live in a different place depending on your account, and each place covers a different scope.

| Your account | Where | What the pixel covers |
| - | - | - |
| Affiliate | **Integrations > Tracking Pixels** | One product, across every affiliate program that includes it |
| E-commerce | **Integrations > Tracking Pixels** | Every purchase in your store |
| Vendor | **Products**, then the product's **Pixels** tab | That product's checkout |

If you do not see the **Tracking Pixels** card under **Integrations**, you have a vendor account without a store: set your pixels on each product instead.

## How to configure

### Affiliate

<Steps>
  <Step title="Open Tracking Pixels">
    Go to **Integrations** and click **Manage** on the **Tracking Pixels** card. The page lists your pixels in three sections: **Meta**, **Google** and **TikTok**.
  </Step>

  <Step title="Create the pixel">
    In the section of the platform you use, click **Create Pixel**. Under **Product**, pick the product you promote. The pixel tracks that product across every affiliate program that includes it, and the product cannot be changed later: to track another product, create another pixel.
  </Step>

  <Step title="Fill in the details">
    Enter a **Name** that helps you recognize the pixel (only you see it) and paste the **Pixel ID** exactly as the platform shows it. See [Pixel IDs](#pixel-ids) for the format each platform uses.
  </Step>

  <Step title="Choose the events and save">
    Under **Event Types**, keep **Initiate checkout** and **Purchase approved** on, or turn off the one you do not want. Save the pixel.
  </Step>
</Steps>

### E-commerce store

<Steps>
  <Step title="Open Tracking Pixels">
    Go to **Integrations** and click **Manage** on the **Tracking Pixels** card. The page lists the pixels of your store in three sections: **Meta**, **Google** and **TikTok**.
  </Step>

  <Step title="Create the pixel">
    In the section of the platform you use, click **Create Pixel**. Enter a **Name** and paste the **Pixel ID**. For Google, you can also fill in **Conversion label**, so the purchase counts as a Google Ads conversion. See [Pixel IDs](#pixel-ids).
  </Step>

  <Step title="Choose the events and save">
    Under **Event Types**, select **Initiate checkout**, **Purchase approved** or both. At least one is required. Save the pixel.
  </Step>
</Steps>

### Vendor

<Steps>
  <Step title="Open the product's Pixels tab">
    Go to **Products**, open the product and select the **Pixels** tab.
  </Step>

  <Step title="Create the pixel">
    Click **Create Meta Pixel**, **Create Google Pixel** or **Create TikTok Pixel**. Enter a **Name** and paste the **Pixel ID**. See [Pixel IDs](#pixel-ids).
  </Step>

  <Step title="Choose the events and save">
    Under **Event Types**, select **Initiate checkout**, **Purchase approved** or both, and click **Save Pixel**.
  </Step>
</Steps>

A pixel can be active or inactive. Inactivate it to pause tracking without losing its configuration, or remove it to delete it for good.

## Pixel IDs

Paste the ID exactly as the ad platform shows it.

| Platform | What to paste | Example format |
| - | - | - |
| Meta | The pixel ID, 15 or 16 digits | `1234567890123456` |
| Google | The Google Ads conversion ID | `AW-1234567890` |
| TikTok | The pixel ID, 20 uppercase letters and digits | `C8XXXXXXXXXXXXXXXXXX` |

<Note>
  A Google Ads conversion needs both the conversion ID (`AW-...`) and the **Conversion label** of the conversion action. The **Conversion label** field is available on store pixels. Without it, Google still receives the purchase event, but it is not recorded as a Google Ads conversion.
</Note>

## Events sent

Every pixel records a page view as soon as the checkout loads. On top of that, it fires the events you enabled:

| Event in the dashboard | Meta | Google | TikTok | When it fires |
| - | - | - | - | - |
| (always) | `PageView` | page view through `config` | `page` | The checkout loads |
| **Initiate checkout** | `InitiateCheckout` | `begin_checkout` | `InitiateCheckout` | The checkout is ready for the buyer |
| **Purchase approved** | `Purchase` | `purchase`, plus `conversion` when a conversion label is set | `CompletePayment` | A card payment is approved on the checkout |

Each event carries the value, the currency and the items of the checkout. The purchase event also carries the purchase code, as `order_id` for Meta and TikTok and as `transaction_id` for Google, so you can match it with the purchase in PagAmerican.

Each event fires once per pixel per page load. If the buyer reloads the checkout, the pixel loads again and the page view and **Initiate checkout** fire again.

## Which pixels fire on a checkout

A checkout does not load every pixel you have. It loads the ones that apply to that visit:

* **Store checkout.** When the checkout belongs to an e-commerce store, only the store's pixels load. Product and affiliate pixels do not fire on it.
* **Product checkout.** Otherwise, the vendor's pixels on the product always load. An affiliate's pixel loads only when the visit is credited to that affiliate, so affiliates never fire each other's pixels.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The pixel does not show up in the ad platform">
    Pixels run in the buyer's browser, so an ad blocker, a privacy extension or a browser that blocks third-party scripts stops them silently. Test on a browser without extensions, and use the platform's own tool (Meta Pixel Helper, Google Tag Assistant or TikTok Pixel Helper) to see whether the pixel loads on the checkout.
  </Accordion>

  <Accordion title="An affiliate pixel never fires">
    Check two things: the visit has to be credited to you, which requires your affiliate link, and the checkout must not belong to an e-commerce store, since store checkouts only load the store's pixels.
  </Accordion>

  <Accordion title="The page view shows up, but the events do not">
    The page view fires for every active pixel, even with both events turned off. Open the pixel and check that **Initiate checkout** or **Purchase approved** is enabled under **Event Types**, and that the pixel is active.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.