The Marketing → Tracking screen connects your shop to Google and Meta advertising and analytics so they measure real sales, not just clicks. There are two cards: Google Analytics and Meta · Pixel and Conversions API. You paste the identifiers once; ZweiHost injects them into your site and sends the events for you.
Both platforms load only after a visitor accepts cookies. Google uses Consent Mode (it loads but stores nothing without consent); the Meta Pixel does not load at all until consent. You configure none of this - it is built in.
Google Analytics (GA4)
- In Google Analytics, open Admin → Data streams and select your site's web stream.
- Copy the Measurement ID (it looks like
G-XXXXXXXXXX). - Paste it into the Google Analytics ID (GA4) field and click Save.
This is a public identifier - it is injected into your site's pages and safe to share.
Google Tag Manager (optional)
If you manage your tags in Google Tag Manager, paste the container ID (GTM-XXXXXXX) into the Google Tag Manager ID field.
Double-counting warning: if your GTM container already fires a Google Analytics tag, leave the Google Analytics ID (GA4) field blank. Otherwise every visit is counted twice. Load GA4 in only one place. ZweiHost warns you when both fields are filled.
For agencies using GTM: available dataLayer events
When a GTM container is set, ZweiHost feeds the storefront a full dataLayer that follows the GA4 Recommended events spec - your container has everything it needs, with no extra code on the site. In your GA4 Event tag, set Send Ecommerce data → Data Layer to map it automatically.
Navigation:
page_view- on every client-side (soft) navigation; carriespage_path,page_location,page_title.
Funnel (data nested under an ecommerce object):
view_itemview_item_list,select_item(+item_list_id,item_list_name)add_to_cart,remove_from_cart,view_cart,add_to_wishlistbegin_checkout,add_shipping_info(+shipping_tier),add_payment_info(+payment_type)view_promotion,select_promotion(+promotion_id,promotion_name,creative_slot)
Purchase:
purchase-ecommerce.transaction_id,ecommerce.value,ecommerce.currency,ecommerce.items[].
Other (flat params, no ecommerce wrapper):
search(search_term),sign_up(method),login(method),generate_lead.
Identity: for a signed-in shopper a user_id is pushed as a separate object (no event key) - map it to the GA4 tag's user_id field.
Each row in ecommerce.items[] carries: item_id, item_name, price, item_variant, item_category, index, quantity (unknown ones are omitted). Every ecommerce push is preceded by { ecommerce: null } so values never bleed between events.
page_view double-count warning: we already push
page_viewon every soft navigation. If you also add a History Change trigger for the same tag, navigations are counted twice - use one or the other. The first (hard) load is counted by your GA4 config tag (All Pages); ourpage_viewevent covers only the navigations after it. So fire the config tag on All Pages / Initialization and the page-view tag on Custom Event = page_view.
Consent warning: ZweiHost applies Consent Mode v2 automatically to Google tags only. The container itself loads regardless of consent, so any non-Google tag you add in GTM (e.g. a TikTok pixel, a hand-rolled Meta pixel) is not automatically consent-gated - gate it yourself behind a consent trigger, or use ZweiHost's built-in Meta fields, which are gated.
Server-side tracking (Measurement Protocol) - Pro and up
Beyond the browser, ZweiHost sends your orders to GA4 from our server too, so no conversion is lost when a browser is blocked or on iOS. It is deduplicated with the browser event by the order number, so nothing is counted twice.
- In GA4 open Admin → Data streams → [your stream] → Measurement Protocol API secrets.
- Click Create, name it, and copy the secret value.
- Paste it into Measurement Protocol · API secret and save.
The secret is encrypted and never shown again (leave the field blank to keep the current one). Alongside it ZweiHost sends Enhanced Conversions - the customer's hashed email/phone, only under advertising consent - for more accurate conversion matching.
Verify
- Send test event - sends a validation purchase to Google's debug endpoint and shows the result immediately. No real orders.
- Test tracking - opens your storefront with GA4 DebugView on, so you can watch events land live while you set up.
Google Ads conversion
For Google Ads to optimise toward sales, it needs the conversion from your shop. There are two paths - use only one:
- (Recommended) Import from GA4. Link your GA4 property to Google Ads (Google Ads → Tools → Data manager / Linked accounts) and import the
purchaseevent as a conversion. It reuses everything above, including Enhanced Conversions - no extra code. - Direct tag. In Google Ads → Goals → Conversions open your purchase action → Tag setup and copy:
- the Conversion ID (
AW-XXXXXXXXX) → paste into the Conversion ID (Google Ads) field; - the conversion label → paste into Purchase conversion label. The tag fires on the order-success page, in the real order currency (Google converts itself).
Use only one path. If you imported
purchasefrom GA4 and fill in the direct tag, Google Ads counts every sale twice. ZweiHost warns you when the direct tag is filled.
Meta · Pixel and Conversions API
- In Meta Events Manager, open Data sources and select your pixel.
- Copy the Pixel ID and paste it into the Pixel ID field (public, safe to share).
- For the Conversions API: under Settings → Conversions API, click Generate access token and copy the token.
- Paste it into Conversions API access token and save.
The token is encrypted and never shown again (a blank field keeps the current one). Also pick your Business country - it is sent hashed with the server events and improves Meta's match quality.
The Meta Pixel runs in the browser; the Conversions API sends the same events from our server too (with hashed customer data) so they survive ad-blockers and iOS. The two deduplicate on a shared
event id. Every value sent to Meta is in EUR, so its ROAS aggregates stay correct.
Verify (Meta Test Events)
- In Events Manager open the Test Events tab and copy the code shown.
- Paste it into Test event code and save - your server events appear there live.
- Clear the code once you have confirmed it works.
Domain verification (in Settings)
The ownership verification codes live in Settings → General, not on this screen:
- Meta domain verification (Business Settings → Brand Safety → Domains, the meta-tag method) - needed so Meta can attribute conversions on your domain (iOS / Aggregated Event Measurement).
- Google site verification (
google-site-verification) - for Google Search Console.
See Site settings.
The product feed (for Merchant Center and the Meta catalog)
One product feed serves both platforms: point Google Merchant Center and Meta Commerce Manager at the same feed URL. The setup - and the feed link itself - is on the Meta catalog screen.
Next step
With tracking in place, connect your catalog for dynamic ads - see Meta catalog.