# Add Google Analytics, Google Ads, Meta and TikTok pixels

> Send your shop's visits, add to carts and sales to your own Google Analytics, Google Ads, 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 18 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.

## Count your sales in Google Ads

Google Ads can report each order as a purchase conversion, with its total. That lets Google show you which ads led to sales, and lets its automatic bidding aim for more of them.

To connect Google Ads:

1. Go to **Settings > Tracking**.
2. Under **Count your sales in Google Ads**, click **Connect Google Ads** and sign in with the Google login you use for Google Ads.
3. Choose your **Google Ads account**. If you only have one, it is chosen for you.
4. Click **Save settings**.

Shoprocket adds a purchase conversion called "Shoprocket purchase" to your Google Ads account and reports every order to it. If you connect again later, the same conversion is used, so you never end up with two. Disconnecting stops the reports but leaves the conversion in your Google Ads account.

When you connect, Shoprocket also reports from our server the sales that Google's browser tag could not report. That covers a sale from one of your ads when the customer's browser blocks Google's tag, and a sale on a website your developer built on the Shoprocket API. To do this, Shoprocket adds a second conversion called "Shoprocket purchase (server)". "Shoprocket purchase" stays the conversion Google Ads counts for every other sale, exactly as before, and no sale is counted twice. A sale reported from our server reaches Google Ads about 6 hours after the customer pays, because Google does not accept a sale any sooner after the ad click.

If you connected Google Ads before this was available, nothing changes for your sales. To also send the sales the browser tag misses, click **Change** and sign in again.

If you don't see **Connect Google Ads**, or an agency runs your Google Ads account, you can enter the conversion yourself:

1. In Google Ads, go to **Goals > Conversions**, open your purchase conversion and choose **Tag setup**. The event snippet shows a line like `'send_to': 'AW-123456789/AbC-D_efG12'`.
2. In Settings > Tracking, click **Show advanced settings**.
3. Under **Google Ads conversion**, enter the part before the slash as the **Conversion ID** (`AW-123456789`) and the part after it as the **Conversion label** (`AbC-D_efG12`).
4. Click **Save settings**.

Each order is reported once, with its total, its currency and its order number. It follows the same cookie consent setting as your other pixels. If you run ads for more than one website, each sale is counted for the ad that was clicked, so every campaign sees its own sales.

## 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.

Customers anywhere else don't see the banner unless you turn on **Ask every shopper before loading pixels** (see below). 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).

## Ask every shopper before loading pixels

The second switch under **Privacy**, **Ask every shopper before loading pixels**, decides what happens when a customer hasn't made a cookie choice yet:

- **Off**: customers outside the UK, the EU and Switzerland are tracked unless they say no. Customers in those places are asked first, by Shoprocket's banner or by your own.
- **On**: your pixels wait for a yes from every customer, wherever they are. Shoprocket's banner then opens for every customer, not only in Europe. If your website has its own cookie banner, your pixels wait for a yes from that banner. A page whose banner sends no choice loads no pixels.

A refusal always wins, whichever way the switch is set.

## 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.
- **Google Ads**: you don't paste anything. Shoprocket sets up server tracking when you click **Connect Google Ads**. A conversion ID you paste in yourself is only reported from the browser.

Apart from Google Ads, 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 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)
