Tracking codes
This page describes the Tracking codes settings in the Admin panel. You can add Google Analytics 4, Google Tag Manager, Facebook Pixel (+ Meta Conversions API), Google Ads conversion tracking, TikTok Pixel (+ TikTok Events API), and Google Search Console verification. Tracking codes are applied only on your shop front (customer-facing pages), not in the Admin area.
Where to find it: Log in to the Admin panel, open the Marketing section, then Tracking codes. The page is at Admin → Marketing → Tracking codes (/admin/tracking-codes). You need the coupons.view (marketing) permission to open it.
1. How tracking is shown on your site
- One configuration per shop: Your shop uses a single set of tracking settings. Saving the form updates this configuration.
- Where codes run: Scripts are inserted only on tenant storefront pages (your shop). They are not inserted in the Admin panel, so your own visits are not measured as customer traffic.
- GDPR / Consent mode: If you use Google Consent Mode v2 in Admin → Settings → GDPR cookies, tracking scripts are not injected on page load. They load only after the customer grants consent, per category: GTM on analytics or marketing consent, GA4 on analytics, Facebook Pixel and TikTok Pixel on marketing. If Consent Mode is off, all enabled tracking codes (GA4, GTM, Facebook Pixel, Google Ads, TikTok) are output directly on the page.
- Important: use either GTM or GA4, not both. Do not turn on Enable GA4 tracking and at the same time fill in Google Tag Manager ID. Use only one of these:
- Option A: Use Google Tag Manager – enter your GTM container ID and leave Enable GA4 tracking off. Configure GA4 (and other tags) inside GTM.
- Option B: Use GA4 directly – turn on Enable GA4 tracking, enter your Google Analytics ID, and leave Google Tag Manager ID empty. Using both will load GA4 twice and can cause duplicate or incorrect data.
2. Ecommerce tracking settings
Platform toggles
| Control | What it does |
|---|---|
| Enable GA4 tracking | When on, the Google Analytics 4 script is added to your site using the Google Analytics ID below. When off, the GA4 script is not output (even if you fill in the ID). |
| Enable Facebook Pixel | When on, the Facebook Pixel script runs using the Facebook Pixel ID below. When off, the Pixel script is not output. |
| Enable Google Ads tracking | When on, the Google Ads conversion script runs using the Google Ads Conversion ID (and optional Conversion Label) below. When off, the script is not output. |
IDs and parameters
| Field | What to enter |
|---|---|
| Google Analytics ID | Your GA4 Measurement ID (e.g. G-XXXXXXXXXX). Used only if Enable GA4 tracking is on. |
| Google Tag Manager ID | Your GTM container ID (e.g. GTM-XXXXXXX). If set, the GTM snippet is included (with Consent Mode on, only after consent is granted; otherwise GTM is included with the rest of the codes). Do not use GTM and GA4 direct tracking together – use only one (see section 1). |
| Facebook Pixel ID | Your numeric Facebook Pixel ID. Used only if Enable Facebook Pixel is on. |
| Google Ads Conversion ID | Your Google Ads Conversion ID (e.g. AW-123456789). Used only if Enable Google Ads tracking is on. |
| Google Ads Conversion Label | Optional conversion label (e.g. AbC-D_efG-h12-34) for the conversion action. |
| Enable Enhanced Conversions | When on, hashed (SHA-256) customer data is sent on purchase for better conversion measurement in Google Ads. Requires marketing consent and active Google Ads or GA4/GTM tracking. |
| Enable Meta Conversions API | When on, conversion events are also sent server-side via the Meta Conversions API. Enter the access token and an optional test event code. |
| Enable TikTok Pixel | When on, the TikTok Pixel script runs using the TikTok Pixel ID. Optionally enable the TikTok Events API (server-side events) with an access token and test event code. |
After changing any of these, click Save settings at the bottom of the form.
3. Google Search Console
This section is for verifying site ownership in Google Search Console. You can use either a meta tag or an HTML file.
Enabling and meta tag
| Control | What it does |
|---|---|
| Enable | When on, the Google Search Console verification meta tag (if provided) or the verification file (if uploaded) is used. When off, verification is not added. |
| Verification meta tag | Paste the full <meta name="google-site-verification" content="..." /> tag from Search Console, or only the content value. The system will output a correct meta tag in the <head> of your pages. |
HTML file verification
| Control | What it does |
|---|---|
| Upload verification file | In Search Console, choose "HTML file" as the verification method and download the file (name like googleXXXXXXXX.html). Here, select that file and click Upload. The file must be .html or .htm, must be named google + hex characters + .html, and must contain google-site-verification. |
| Verification file uploaded | After a successful upload, the stored filename is shown. You can Remove it to delete the file and clear the setting. |
How verification works: After upload, the file is available at https://your-shop-domain.example/googleXXXXXXXX.html (same path as in Search Console). In Search Console, click Verify; Google will fetch that URL and confirm ownership.
Steps in short:
- Open Google Search Console, add your property (URL prefix).
- Choose HTML tag and paste it into Verification meta tag, or choose HTML file, download the file, and upload it here.
- Save the Tracking codes form if you only added the meta tag, or upload the file and click Verify in Search Console.
4. Custom scripts (Settings → Custom Code)
Custom scripts are not managed on the Tracking codes page but in Admin → Settings → Custom Code (/admin/settings/custom-code):
| Control | What it does |
|---|---|
| Custom code for <head> | Scripts or tags inserted in the <head> of each storefront page. Example: analytics or verification snippets that belong in the head. |
| Custom footer code | Scripts or tags inserted at the end of the page. Example: chat widgets and other supplementary scripts. |
| Custom CSS | Additional styles for the storefront. |
The fields accept raw HTML (e.g. <script>...</script>) and have a size limit. They are output only on the shop front, not in Admin. If you use Google Consent Mode v2, consider running marketing/analytics scripts via GTM so consent is respected.
5. Summary
- Single config per shop, saved with Save settings.
- Storefront only – no tracking in Admin.
- Use either GTM or GA4, not both – otherwise GA4 can load twice and data will be wrong. Use GTM (and add GA4 inside it) or use GA4 direct only.
- Consent Mode on → scripts load only after consent is granted (per consent category). Consent Mode off → all enabled codes (GA4 or GTM, Facebook Pixel, Google Ads, TikTok, GSC) are injected.
- Google Search Console: use meta tag and/or HTML file upload; verification URL is
https://your-shop-domain.example/googleXXXXXXXX.html. - Custom scripts and CSS are managed in Admin → Settings → Custom Code.