Skip to content

Tracking codes

This page describes the Tracking codes settings in the Admin panel. You can add Google Analytics 4, Google Tag Manager, Facebook Pixel, Google Ads conversion tracking, Google Search Console verification, and custom scripts to your storefront. 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, the system injects only Google Tag Manager (GTM) on the front. In that case, you should configure GA4, Facebook Pixel, Google Ads, and other tags inside GTM and let GTM respect user consent. If Consent Mode is off, all enabled tracking codes (GA4, GTM, Facebook Pixel, Google Ads, custom) 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

ControlWhat it does
Enable GA4 trackingWhen 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 PixelWhen on, the Facebook Pixel script runs using the Facebook Pixel ID below. When off, the Pixel script is not output.
Enable Google Ads trackingWhen 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

FieldWhat to enter
Google Analytics IDYour GA4 Measurement ID (e.g. G-XXXXXXXXXX). Used only if Enable GA4 tracking is on.
Google Tag Manager IDYour GTM container ID (e.g. GTM-XXXXXXX). If set, the GTM snippet is always included (in Consent Mode only GTM is injected; 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 IDYour numeric Facebook Pixel ID. Used only if Enable Facebook Pixel is on.
Google Ads Conversion IDYour Google Ads Conversion ID (e.g. AW-123456789). Used only if Enable Google Ads tracking is on.
Google Ads Conversion LabelOptional conversion label (e.g. AbC-D_efG-h12-34) for the conversion action.
Enable Enhanced ConversionsWhen on, enables Google Enhanced Conversions (e.g. hashed customer data) for better conversion measurement. Only relevant when Google Ads tracking is enabled.

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

ControlWhat it does
EnableWhen 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 tagPaste 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

ControlWhat it does
Upload verification fileIn 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 uploadedAfter 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:

  1. Open Google Search Console, add your property (URL prefix).
  2. Choose HTML tag and paste it into Verification meta tag, or choose HTML file, download the file, and upload it here.
  3. Save the Tracking codes form if you only added the meta tag, or upload the file and click Verify in Search Console.

4. Custom tracking codes

Use this for any other scripts that must run on every storefront page.

ControlWhat 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 code for <body>Scripts or tags inserted right after the opening <body> tag. Example: chat widgets or other scripts that should load early in the body.

Both fields accept raw HTML (e.g. <script>...</script>). 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 → only GTM is injected; manage other tags in GTM. Consent Mode off → all enabled codes (GA4 or GTM, Facebook Pixel, Google Ads, custom, 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 head/body for any extra scripts.