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

# Google Tag Manager & Meta Pixel

> Track customer behaviour and conversions on your storekit store with Google Tag Manager and Meta Pixel. Measure ad performance and build retargeting audiences.

Connect your store to Google Tag Manager (GTM) and Meta Pixel (Facebook Pixel) to track customer behaviour, measure ad performance, and build retargeting audiences.

## What's Tracked

storekit fires standard e-commerce events that GTM and Meta Pixel can capture:

| Event           | Description                           |
| --------------- | ------------------------------------- |
| **Page view**   | Customer views a page on your store   |
| **Add to cart** | Customer adds a product to their cart |
| **Checkout**    | Customer begins the checkout process  |
| **Purchase**    | Customer completes an order           |

## Setup

1. Go to **Store Settings** > **Integrations/Marketing**
2. Enter your **GTM Container ID** (format: `GTM-XXXXXXX`)
3. Enter your **Meta Pixel ID** (if using Facebook/Instagram ads)
4. Click **Save**

Tags begin firing immediately after saving.

## Use Cases

| Use Case                | Platform   | Description                                                 |
| ----------------------- | ---------- | ----------------------------------------------------------- |
| **Retargeting ads**     | Meta Pixel | Show ads to customers who viewed your menu but didn't order |
| **Conversion tracking** | GTM / Meta | Measure how many ad clicks result in orders                 |
| **Audience building**   | Meta Pixel | Create lookalike audiences based on your customers          |
| **ROI measurement**     | GTM        | Track revenue generated from specific campaigns             |
| **Custom analytics**    | GTM        | Send events to Google Analytics, Hotjar, or other tools     |

## Google Tag Manager

GTM acts as a container for all your tracking tags. Once your GTM Container ID is added to storekit, you can manage all tags, triggers, and variables from the GTM dashboard without editing your store settings.

### Verifying Your Setup

After adding your GTM Container ID:

1. Install the **GTM Preview** browser extension
2. Open your store in preview mode
3. Verify that tags fire on page views, add to cart, and purchase events

## Meta Pixel

Meta Pixel tracks customer actions for Facebook and Instagram ad optimisation.

### Verifying Your Setup

After adding your Meta Pixel ID:

1. Install the **Meta Pixel Helper** browser extension
2. Visit your store
3. Confirm the pixel fires on each page and event

<Tip>
  Test your tags thoroughly after setup. Use GTM Preview mode and Meta Pixel Helper to verify all events fire correctly before running ad campaigns.
</Tip>
