Track WooCommerce product views and purchases in Google Analytics 4 — and use the same data to build your own Facebook Pixel or Google Ads tags in Google Tag Manager — with no coding required.
Datalayer for WooCommerce FREE pushes a complete dataLayer into Google Tag Manager for every visitor action:
- Product Detail Impressions (
view_item) — full product data (ID, price, currency), ready to power a custom Facebook Pixel or Google Ads tag too
- Related Products in Product Page (
view_item_list)
- Purchase (
purchase) — full order data (ID, value, currency, items), ready to power a custom Facebook Pixel or Google Ads tag too
Want a ready-made GTM container for Google Ads, Meta Ads, Pinterest Ads, TikTok Ads and Microsoft Ads — plus all events (add_to_cart, begin_checkout, add_shipping_info and more), Consent Mode and Server-to-Server tracking?
Get the PRO version from the Official WooCommerce Store:
Datalayer for WooCommerce PRO
Discover our demo store:
Demo Shop
- Upload the plugin files to the
/wp-content/plugins/datalayer-for-ecommerce-free directory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the 'Plugins' screen in WordPress
- Use the WooCommerce > Datalayer for WooCommerce -> screen to configure the plugin
Configuration
Google Tag Manager ID -> Enter the GTM-XXXXXX ID to activate the Google Tag Manager code snippet
DataLayer for WooCommerce Ecommerce GA4 -> Enable this option if you use only
Google Analytics 4 (GA4)
Show user info -> Select if user information show or not when logged
Import Google Tag Manager
- Download the workspace.zip file in WooCommerce > Datalayer for WooCommerce > Download import File GTM.
- Go to Google Tag Manager > Admin > Import Container
- Select the file you want to import: GTM-GA4-FREE.json
- After selecting the file, import the tags.
Settings Google Analytics 4
- In GTM, go to the tag GA4 – Tag and add your measurement id and click save.