# Add Google Analytics, Meta and TikTok pixels

> Send your shop's visits, add to carts and sales to your own Google Analytics, Meta and TikTok accounts. Paste each ID in Settings > Tracking, or connect Google in one click, and choose whether pixels wait for the customer's cookie consent and whether your website shows our cookie banner.

Help Centre / Marketing - Updated 16 November 2026

Tracking pixels report what customers do in your shop to your own advertising and analytics accounts, so Google, Meta and TikTok can measure your ads and show them to the right people. Shoprocket reports the same five moments to each account you set up, from your Shoprocket shop and from every embed on your own website:

- Page view
- Product viewed
- Added to cart
- Checkout started
- Purchase, with the order total and currency

A purchase is reported once per order, even if the customer reloads the thank-you page.

These are your own accounts, separate from Shoprocket's **Analytics**, which keeps working either way. See [Analytics](https://shoprocket.io/help/analytics.md).

## Before you begin

Tracking comes with the **Tracking pixels** app, which is on every plan. If you don't see **Tracking** under **Settings** in your sidebar, go to **Apps**, find **Tracking pixels** under **Marketing** and click **Add**. See [Add and remove apps](https://shoprocket.io/help/the-apps-page.md).

## Connect Google Analytics

The easiest way to add Google Analytics is to connect your Google account:

1. Go to **Settings > Tracking**.
2. Under **See your sales in Google Analytics**, click **Connect Google** and sign in.
3. Choose your **Google Analytics property**.
4. Tick the box to confirm your shop's privacy policy covers sending shopper data to Google Analytics. Google requires this.
5. Click **Save settings**.

Shoprocket sets up browser tracking and server tracking for you, with nothing to paste. The card then says "Google Analytics is set up" with your measurement ID.

![Settings > Tracking with Google Analytics set up on its measurement ID, and the Advertising pixels card below it with the Google Analytics 4 and Meta pixel IDs](https://shoprocket.io/img/help/marketing-pixels-and-consent/tracking-settings.webp)

## Paste your pixel IDs

Under **Advertising pixels**, paste the ID from each platform you use. Leave one blank to turn it off.

| Field | Where to find it |
|---|---|
| **Google Analytics 4 measurement ID** | Looks like `G-XXXXXXXXXX`. Google Analytics > Admin > Data streams > your web stream. Not a Tag Manager or Google Ads ID. |
| **Meta pixel ID** | 15-16 digits. Meta Events Manager > Data sources > your pixel. Covers Facebook and Instagram ads. |
| **TikTok pixel ID** | 20 letters and digits. TikTok Ads Manager > Assets > Events > Web events > your pixel. |

Click **Save settings**. If an ID doesn't look right, the field says so before you save.

## Choose when pixels load

Under **Privacy**, **Only load pixels after the shopper consents** decides what happens before a customer has made a cookie choice:

- **Off**: pixels load unless your cookie banner says the customer refused.
- **On**: nothing loads until your cookie banner says the customer agreed. This is the stricter reading of UK and EU rules, and the safer choice if you sell into Europe.

A refusal always wins. With the switch on, a page that publishes no consent at all loads no pixels.

## The cookie banner

Your Shoprocket shop shows a cookie banner to customers in the UK, the EU, the EEA and Switzerland. It asks before any analytics or marketing cookies are used, in the customer's language and in your shop's colours. Until a customer there clicks **Accept all**, or turns marketing on under **Choose cookies**, your pixels don't load, whatever the switch above says.

Customers anywhere else don't see the banner, and your pixels follow the switch above. Any customer can open the banner from **Your privacy choices** at the bottom of your shop, change their answer, or turn the cookies off.

![A cookie banner in the corner of a shop page, with Reject all and Accept all buttons side by side and a Choose cookies link below them](https://shoprocket.io/img/help/marketing-pixels-and-consent/shop-cookie-banner.webp)

## Show the banner on your own website

If your own website shows your Shoprocket products and has no cookie banner, you can use ours there too. In Settings > Tracking, under **Privacy**, turn on **Show Shoprocket's cookie banner on my site** and click **Save settings**. It works the same way as in your shop.

Leave it off if your website already has a cookie banner, so customers aren't asked twice. Shoprocket then reads the choice your banner publishes:

- **Google Consent Mode**, which most cookie banners send.
- The browser's **Global Privacy Control** setting, which counts as a refusal.
- A `shoprocket:consent` event, for a banner that has neither. A developer can add it with one line of code. See [consent in the developer guide](https://shoprocket.io/docs/javascript.md#consent).

The same choice also decides what Shoprocket itself stores on the customer's device. To see what that is, read [What Shoprocket stores on your customers' devices](https://shoprocket.io/help/cookies-and-customer-privacy.md).

## Server tracking (advanced)

Ad blockers and Safari hide some sales from browser pixels. Click **Show advanced settings** to also send each paid order from our server, so those sales still count. When a purchase arrives both ways, each platform keeps only one, so nothing is counted twice.

- **Meta Conversions API**: if your shop is connected in **Facebook & Instagram**, purchases are already sent through that connection, with no token needed. Otherwise paste a **Conversions API access token** from Meta Events Manager > your pixel > Settings > Conversions API.
- **TikTok Events API**: paste an **Events API access token**.
- **Google Analytics Measurement Protocol**: paste a **Measurement Protocol API secret**, or connect Google under **See your sales in Google Analytics** and it is created for you.

Each one needs its pixel ID entered under **Advertising pixels** first. Tokens are stored encrypted and never shown again. With a **Test event code**, purchases go to the platform's test view instead of counting toward your ads, and test-mode orders are sent too. Clear it when you are done testing.

Once set up, the card says when the last purchase was sent, or what the platform said if it refused one.

## Google Tag Manager (advanced)

For Google Ads, Pinterest, Snapchat or any other platform, paste your **Google Tag Manager container ID** (`GTM-XXXXXXX`) under the advanced settings. Your container receives every view, add to cart, checkout and purchase. It loads under the same consent setting as your pixels.

## Good to know

- Shoprocket only sends to the IDs you enter here. If your own website already loads the same pixel and it also reports sales, switch one of the two off, or every sale is counted twice.
- Numbers in an ad platform never match Shoprocket's exactly, because each platform counts and attributes sales its own way.
- A new pixel can take a while to show data in the platform's own reports.

## Related

- [Analytics](https://shoprocket.io/help/analytics.md)
- [Where your sales came from](https://shoprocket.io/help/where-your-sales-came-from.md)
- [Sell on Facebook and Instagram](https://shoprocket.io/help/sell-on-facebook-and-instagram.md)

[Open Tracking in your dashboard](https://app.shoprocket.io/go/settings/tracking)

---

- HTML version: https://shoprocket.io/help/marketing-pixels-and-consent
- Language: English (en)
- Also in: [العربية](https://shoprocket.io/ar/help/marketing-pixels-and-consent.md), [Deutsch](https://shoprocket.io/de/hilfe/google-analytics-meta-und-tiktok-pixel-hinzufuegen.md), [Ελληνικά](https://shoprocket.io/el/help/marketing-pixels-and-consent.md), [Español](https://shoprocket.io/es/ayuda/anade-google-analytics-y-pixeles-de-meta-y-tiktok.md), [Français](https://shoprocket.io/fr/aide/ajouter-google-analytics-et-les-pixels-meta-et-tiktok.md), [עברית](https://shoprocket.io/he/help/marketing-pixels-and-consent.md), [हिन्दी](https://shoprocket.io/hi/help/marketing-pixels-and-consent.md), [Bahasa Indonesia](https://shoprocket.io/id/bantuan/piksel-pemasaran-dan-persetujuan.md), [Italiano](https://shoprocket.io/it/aiuto/aggiungi-google-analytics-e-pixel-meta-e-tiktok.md), [日本語](https://shoprocket.io/ja/help/marketing-pixels-and-consent.md), [Lietuvių](https://shoprocket.io/lt/pagalba/rinkodaros-pikseliai-ir-sutikimas.md), [Norsk](https://shoprocket.io/nb/hjelp/markedsforingspiksler-og-samtykke.md), [Nederlands](https://shoprocket.io/nl/hulp/marketingpixels-en-toestemming.md), [Polski](https://shoprocket.io/pl/pomoc/piksele-marketingowe-i-zgoda.md), [Português](https://shoprocket.io/pt/ajuda/adicione-google-analytics-e-pixels-da-meta-e-do-tiktok.md), [Română](https://shoprocket.io/ro/ajutor/pixeli-de-marketing-si-consimtamant.md), [Русский](https://shoprocket.io/ru/help/marketing-pixels-and-consent.md), [ไทย](https://shoprocket.io/th/help/marketing-pixels-and-consent.md), [Türkçe](https://shoprocket.io/tr/yardim/pazarlama-pikselleri-ve-onay.md), [中文](https://shoprocket.io/zh/help/marketing-pixels-and-consent.md)
