Help · Marketing & Visibility · Google

Set Up Google Analytics, Ads, and Tag Manager

Here’s how to integrate Google Analytics 4, Google Ads conversion tracking and remarketing, and Google Tag Manager. All you need to do is enter your IDs in the backend. The store takes care of the rest: It reports product views, shopping cart activity, and purchases to Google while respecting your visitors’ consent.

At a Glance

  • Location: Google settings are grouped under Settings → Interfaces → SEO/SEA → Google Services. Cookie banners and sitemaps have their own sections, which this guide specifies separately.
  • An ID: Enter either your Google Analytics ID (G-…) or your Tag Manager ID (GTM-…)—not both.
  • Purchase Data: Set “Google Analytics Tracking Level” to details. By default, the value is set to none; in this case, the store does not report purchases to Google Analytics. Conversion tracking for Google Ads runs independently of this setting.
  • Consent: The store uses Google’s Consent Mode v2. Without consent via the cookie banner, Google does not set cookies for analytics and advertising and receives only cookie-less signals. However, the Google scripts load beforehand. If you do not want any connection to Google at all before consent is given, select the mode safemode.
  • Google Ads: You set up conversion tracking and remarketing using two IDs and a label. The store automatically transmits the data for enhanced conversions in direct mode; you must enable this feature in Google Ads.
  • Product Data: The product feed for Google Merchant Center is covered in a separate guide: Google Merchant Center & Product Feed.

In this guide


Where to Find the Settings

The Google settings are grouped together here: Settings → Interfaces → SEO/SEA → Google Services.

What’s in the group

  • Google Analytics and Tag Manager: ID, tracking level, pricing basis
  • Consent Mode and Tag Manager loading options
  • Google Ads: Conversion ID, Conversion Label, Remarketing ID
  • Settings for the product feed and local inventory
  • Google Merchant Center ID for Store Widget and Customer Reviews
  • Verification code for Google Search Console

Older Stores

The “Google Services” group has been available since XONIC 4.8.5. In older versions, the fields are located under Settings → SEO / SEA → Tracking. You can view your version under Tools → xoUpdate in the top-right corner after “Shop:”.

The fields are numbered in the list. The numbers depend on your store. This guide therefore always specifies the field name.

"Google Services" configuration group in the backend, including measurement ID, tracking level details, pricing basis, consent mode, and Google Ads IDs

The “Google Services” group: Measurement ID, Tracking Level “details,” Consent Mode, and the Google Ads IDs (placeholder values). Click to enlarge.


Directly or via Tag Manager?

The “Google Analytics Tracking Code (UA ID) or Google Tag Manager ID” field determines how the store communicates with Google. It accepts exactly one ID.

Direct: Measurement ID G-…

The store loads Google Analytics on its own and sends all events directly. It also manages conversion tracking, enhanced conversions, and Google Ads remarketing on its own.

This is suitable if you use Google Analytics and Google Ads and don’t need any additional tags. This is the simplest method.

Tag Manager: GTM-…

The store loads your Tag Manager container and places all events in the “ dataLayer.” You specify within the container which tags send data to Google or other services.

This is a good fit if you manage additional tags or if an agency handles the container. You’ll then set up Google Analytics and Google Ads within the container.

You can’t do both at the same time: A G- ID and a GTM- ID cannot be entered in the same field. If you need Google Analytics in addition to Tag Manager, create the Google tag within the container.

Setting Up Google Analytics 4

In five steps, your store can track visits, product views, shopping carts, and purchases in Google Analytics 4.

  1. Create a data stream: In Google Analytics, go to Admin → Data Streams to create a web data stream for your store’s domain and copy the measurement ID (it starts with G-).
  2. Enter the ID: Enter the tracking ID in the “Google Analytics Tracking Code (UA ID) or Google Tag Manager ID” field. The field still has the old name but accepts the new ID.
  3. Select tracking level: Set “Google Analytics Tracking Level” to details. Only then will purchases, including items, be reported to Google (see table below).
  4. Select Price Basis: “Google Tracking: Price Basis” determines whether revenue and item prices are reported as gross or net. The default is gross. This field has been available since XONIC 4.9.46.
  5. Set up consent: Check the cookie banner and Consent Mode; see Consent.

What the tracking level does

ValuePurchase (purchase)Items in Cart, Checkout, and Purchase
none (Default)Not reportedNo
orderOrder number, total amount, tax, shippingNo
order_plusas orderno
details (recommended)Order number, total value, tax, shippingYes, with item number, name, price, and quantity

The store always reports product views, the shopping cart, and the checkout steps. The tracking level only determines whether the purchase is reported and whether the events include the item list.

The store reports the following events

Product page

view_item

Shopping Cart

add_to_cart, remove_from_cart, view_cart

Checkout and Purchase

begin_checkout, add_shipping_info, add_payment_info, purchase

The store reports the item number as the item ID. This is the same ID as in the product feed for Merchant Center, so that Google Ads can match purchases with feed items. For variants, it also reports the family (item_group_id).

If a customer is logged in, the store passes their customer number to Google Analytics as a user ID in direct mode. Be sure to mention this in your privacy policy.

Although the field still accepts Universal Analytics IDs (UA-…), Google has not processed them since July 2023. If a UA- ID is entered there, your store will not track anything. Enter your G- ID.

Google Tag Manager

With a GTM- ID, the store loads your container and places all events in the Google Analytics 4 format into the dataLayer. Before each event, it clears the old e-commerce entry.

Datalayer Mode

normal loads the container and dataLayer. datalayeronly only creates the dataLayer; you then integrate the container yourself. Note: In this mode, the store does not set any consent requirements; your own integration must handle this.

Loading Mode

normal loads the container immediately, but domready only after the page has loaded. This reduces the load on page rendering, but the tags start a little later.

Custom Loader URL

For first-party tagging via your own server, enter the address using the placeholder {id}. This only works with GTM--ID and Datalayer Mode normal. Since XONIC 4.8.4.

Google Ads via Tag Manager: Be sure to enter the conversion ID and the label or the remarketing ID in the store settings anyway. Only then will the cookie banner display the “Google Ads” category, and only after consent is given there will the store report consent for advertising to Google. Without these fields, the advertising signals in Consent Mode will always remain set to “declined.” In Tag Manager mode, the fields themselves do not generate any tags.
Additional tags in the container: Even with Tag Manager, the store reports the purchase (purchase) only if “Google Analytics Tracking Level” is not set to “ none.” The cookie banner only queries “Google Analytics” and “Google Ads”; tags from other providers must be linked to consent within the container itself. After each decision made in the banner, the store sets the event xo_consent_update (with consent_ad and consent_analytics) in the dataLayer.

Google Ads: Conversion Tracking

To let Google Ads know which ad led to which purchase, the store reports each purchase as a conversion.

  1. Create a conversion action: In Google Ads, go to Goals → Conversions and create a website conversion named “Purchase.” During setup, Google displays the conversion ID (AW- followed by numbers) and the conversion label. You do not need to add any code; the store handles this automatically.
  2. Enter the ID: Enter the numbers in “Google Conversion ID (Conversion).” The shop will remove any preceding AW- when saving.
  3. Enter label: Enter the label in “Google Conversion Label (Conversion).”

On the order confirmation, the store then reports the conversion with the order number, value, and currency. The value follows the pricing basis from the Analytics settings. Conversion tracking runs independently of the tracking level, but only in direct mode. Use Tag Manager to set up the conversion in the container.

Advanced Conversions

In direct mode, the store also passes the customer’s email address, name, and street address along with the conversion, as well as the phone number if it is stored in international format (+49 …). This information is sent to Google as SHA-256 hash values—that is, pseudonymized; city, ZIP code, and country are sent in plain text. Google uses this information to attribute purchases more accurately. Enable the feature in Google Ads under Goals → Settings → Enhanced Conversions, select “Google Tag” as the method, and mention the service in your privacy policy.


Google Ads: Remarketing

With remarketing, you can show visitors to your store ads again later—if desired, featuring exactly the products they viewed.

Setup

Enter the digits of your Google Ads ID in “Google Conversion ID (Remarketing)”—usually the same as your Conversion ID—but without AW-. Unlike with the Conversion ID, the store does not remove the prefix here, and remarketing will not work with AW-.

Dynamic Remarketing

On product pages, the store reports the product ID, page type, and value. Because the product ID is also included in the product feed, Google Ads can pull the viewed products from your Merchant Center into the ad.


Consent: Cookie Banner and Consent Mode v2

In the EU, Google Analytics and Google Ads may only process personal data after your visitors have given their consent. The store handles this using its cookie banner and Google’s Consent Mode.

Categories in the Cookie Banner

Once an ID is entered, the banner offers the appropriate category: “Google Analytics” for statistics and “Google Ads” for conversion tracking and remarketing. You can manage the explanatory texts for these in the CMS Manager under the modules $tracking_google_analytics and $tracking_google_ads.

You can configure the banner under Settings → Privacy → General. Leave “Cookie Consent Tool: Mode” set to modal. With false, the store does not display a banner and treats all services as if visitors have given their consent. “Privacy Consents for Tracking Scripts” must be set to false (default). In this case, no category is preselected, and visitors must actively give their consent.

“Google Consent Mode” setting

googleconsentmodev2 (Default): Google scripts always load, but for visitors from the EU, the EEA, Switzerland, and the UK, they are set to “declined” by default. After clicking the banner, the store immediately reports the decision to Google without reloading the page. Without consent, Google receives only cookie-less signals without identifiers, which it uses to estimate gaps in the reports.

safemode: The scripts load only after consent is given, at the latest when the next page is loaded. This is the stricter option, but Google will not receive these signals.

Cookie banner with custom settings: toggles for Google Analytics and Google Ads, both turned off

Individual cookie settings: When IDs are entered, “Google Analytics” and “Google Ads” appear, neither of which is preselected. Click to enlarge.

Since March 2024, Google has required consent signals via Consent Mode v2 for visitors from the EEA. If these signals are missing, remarketing lists will not be populated with these visitors, and Google cannot model conversions without consent. With the setting googleconsentmodev2, the store sends these signals; with Tag Manager, they are sent only in Datalayer Mode normal. The legal texts and the privacy policy remain your responsibility.

Connect to Google Search Console

Search Console shows how Google finds and indexes your store. The store will set up the meta tag for ownership verification on your behalf.

  1. Create a property: In Search Console, create a URL prefix property for your store’s address and select “HTML tag” as the verification method.
  2. Enter the meta tag: Enter the complete meta tag (<meta name="google-site-verification" content="…">) in the “Google Site Verification Code” field, save it, and click “Verify” in Search Console.
  3. Submit a sitemap: Under “Sitemaps,” submit the address sitemap_index.xml. The store generates the sitemaps itself; settings can be found under “Settings” → “SEO / SEA” → “SEO Settings,” and an overview is available under “Tools” → “SEO Sitemaps.” In Multishop, each domain has its own file; the correct address is listed in the “Sitemap:” line of your robots.txt.

Check that everything is working

After setup, it’s a good idea to make a test purchase. This way, you can verify that consent, events, and conversions are correct.

Real-Time and DebugView

Open the store in an incognito window, click “Agree” on the banner, and check Google Analytics under Reports → Real-Time. With Google Tag Assistant, you can also view each event and the consent status. As long as Tag Assistant is connected, Google Analytics will also display the events under DebugView.

Test Purchase

Order an item—for example, by prepayment—and check whether purchase is recorded with the order number and value. If the purchase isn’t recorded, the tracking level is usually still set to none.

Duplicate Purchases

If a customer reopens the order confirmation, the purchase may be recorded twice. In Google Analytics, you can check this using an exploratory analysis with “Transaction ID” and “Number of Events.”


Settings at a Glance

All fields under Settings → Interfaces → SEO/SEA → Google Services. The Google Merchant Center & Product Feed guide explains the feed and widget settings.

Google Analytics Tracking Code (UA ID) or Google Tag Manager ID
GOOGLE_ANALYTICS_TRACKING_CODE
Your tracking ID G-… or your Tag Manager ID GTM-…. Blank = no Google Analytics and no Tag Manager.
Google Analytics Tracking Level
GOOGLE_ANALYTICS_TRACKING_GRAD
none, order, order_plus, details. Default: none, recommended: details.
Google Tracking: Price Basis
GOOGLE_ANALYTICS_TRACKING_PRICE_BASE
Gross (default) or net; applies to Google Analytics, the conversion value, and remarketing. A change will affect reported revenue starting from that point in time.
Google Consent Mode
GOOGLE_CONSENT_MODE
googleconsentmodev2 (default) or safemode; see Consent.
Google Tag Manager: Data Layer Mode
GOOGLE_DATALAYER_MODE
normal (default) or datalayeronly.
Google Tag Manager: Loading Mode
GOOGLE_LOADING_MODE
normal (default) or domready.
Google Tag Manager: Custom Loader URL (First-Party Tagging)
GOOGLE_TAG_MANAGER_LOADER_URL
Address with {id}; empty = Google’s default loader.
Google Conversion ID (Conversion)
GOOGLE_CONVERSION_ID
Digits of the conversion ID; the store removes AW-.
Google Conversion ID (Remarketing)
GOOGLE_CONVERSION_ID2
Digits of the Google Ads ID, without AW-.
Google Conversion Label (Conversion)
GOOGLE_CONVERSION_LABEL
Label for the “Purchase” conversion action.
Google Site Verification Code
GOOGLE_SITE_VERIFICATION
The complete meta tag from Search Console.

Pitfalls

Things to Watch Out For

  1. No purchases in Google Analytics: “Google Analytics Tracking Level” is set to “ none.”
  2. No data at all: The field still contains an old UA- ID.
  3. Remarketing lists remain empty: The remarketing ID is listed as AW- in the field, or Google Ads is running only through Tag Manager and the Ads IDs are missing from the store settings.
  4. Duplicate tracking: Google Analytics is set up in the store and also in the Tag Manager container or in a separate script. Use only one method.
  5. No consent in the store’s own Tag Manager code: With ` datalayeronly `, the store does not set any consent requirements.
  6. Revenue fluctuations: The pricing basis has been changed. Compare time periods only when they use the same pricing basis.
  7. The “Google Ads” category is missing from the banner: Neither a conversion ID with a label nor a remarketing ID has been entered.

Checklist: Set up Google Analytics and Google Ads

  • Select operating mode —either directly with a G- ID or via Tag Manager with a GTM- ID.
  • Enter the ID —no longer use a UA- ID.
  • Setthe details tracking level and pricing basis.
  • Google Ads – Conversion ID and label, remarketing ID without AW-; enter them anyway using Tag Manager.
  • Check the cookie banner – “Google Analytics” and “Google Ads” categories are visible, nothing is preselected, and the explanatory texts in the CMS Manager are up to date.
  • Search Console – Enter the meta tag, confirm, and submit the sitemap_index.xml.
  • Test purchase – Check the real-time report and Tag Assistant.

Frequently Asked Questions

Do I need Google Tag Manager?

No. For Google Analytics, conversion tracking, and Google Ads remarketing, direct mode with your G- ID is sufficient. You’ll need Tag Manager if you want to manage additional tags.

Why don’t I see any purchases in Google Analytics?

In most cases, the “Google Analytics Tracking Level” is still set to the default “ none.” Set it to “ details.” Additionally, Google only reports purchases if the visitor has consented to the “Google Analytics” category in the cookie banner; without consent, Google only estimates the values.

Can I set up Google Analytics and Tag Manager at the same time?

No, the field accepts exactly one ID. If you use Tag Manager, set up Google Analytics in the container.

Does the store send data to Google before the visitor consents?

For Google Analytics and Google Ads, the following applies: With the setting googleconsentmodev2, the browser loads the Google scripts even before consent is given. Google then does not set cookies for analytics and advertising and receives only cookie-less signals—though technically, it does receive the IP address. With safemode, these scripts load only after consent is given. Regardless of this, the Store Widget, Google Customer Reviews, Google Maps, and reCAPTCHA will load without consent via the cookie banner as soon as you’ve set them up. Be sure to list these services in your privacy policy.

Gross or net: Which is better for Google Ads?

For measuring ad performance, “net” is usually preferred because tax is not considered revenue. Above all, it’s important not to constantly change this setting; otherwise, you won’t be able to compare time periods.

Where do I manage the text in the cookie banner?

In the CMS Manager, in the modules “ $tracking_google_analytics ” and “ $tracking_google_ads.” You can manage the banner itself under Settings → Privacy → General (leave “Cookie Consent Tool: Mode” set to “ modal ”).

Additional Guides

We'll set up Google with you

We’ll help you with Google Analytics, Google Ads, and Tag Manager, and work with you to verify that consent and purchase data are being collected correctly.

Contact Support Now