Tracking simulator: the journey of a data point
Pick an event and follow it step by step: site, WPCode snippet, dataLayer, GTM triggers, variables (DLV, CJS) and tags, then GA4, Google Ads and Meta. Click any block for its explanation.
The 7 steps of a tracking data point
- 01
The site
The customer acts on the WooCommerce store: views a page, a product, adds to cart or pays.
- 02
The WPCode snippet
A small piece of code gets the information out of WooCommerce: products, prices, order, customer.
- 03
The dataLayer
The information is dropped into the dataLayer with dataLayer.push, with an event name (view_item, add_to_cart, purchase…).
- 04
GTM triggers
A custom event trigger recognises the event name and allows the tags to fire.
- 05
GTM variables
DLVs read dataLayer values, CJS compute new information, constants hold the IDs.
- 06
GTM tags
Each tag sends the right data to the right tool: GA4, Google Ads conversion and remarketing, Meta Pixel.
- 07
The tools
GA4 analyses sales and journeys; Google Ads and Meta optimise bidding and retarget visitors.
Frequently asked questions
What is the dataLayer?
The dataLayer is an invisible mailbox present on every page. The site drops messages into it with dataLayer.push (event name and e-commerce data), and Google Tag Manager reads them to send the information to marketing tools.
What is the difference between a DLV and a CJS in GTM?
A DLV (Data Layer Variable) reads a value that already exists in the dataLayer, such as the order amount. A CJS (Custom JavaScript variable) computes new information from DLVs, such as “VIP customer” when the amount exceeds 200 TND.
Why three tags for Google Ads?
The Conversion Linker keeps track of the ad click, the conversion tag reports the sale and its amount to optimise bidding, and the remarketing tag adds visitors to lists to retarget them with the product they viewed.
Is the customer email sent to GA4?
No. Email and phone are sent only to Google Ads (Enhanced Conversions) and Meta, hashed with SHA-256 by the tag right before sending, and only if the customer accepted advertising cookies. No personal data should go to GA4.
What happens if the visitor refuses cookies?
With Consent Mode v2, Google Ads tags and the Meta Pixel do not send full data. GA4 can send a cookieless ping, which it uses to estimate missing conversions.