Create a Google Tag Manager acccount for the site
- Go to Google Tag Manager.
- Create a new account (add site, ect.)
- Copy the Google Tag Manager ID
- Click the Google Tag Manager ID on the top right and copy both codes
- Login to your site and add them (eg. by using elementor custom code)
Install and setup GTM4WP
- Login to WooCommerce
- Install and activate GTM4WP
- Go to plugins page and click Settings right down of the plugin
- Insert your Google Tag Manager ID
- Save changes
Add Google Analytics tag
In your Google Tag Manager container, you will first need to add a Google Analytics 4 configuration tag if you haven’t added it yet. This will store your Google Analytics 4 web stream ID (G-XXXXXXXXX) and every global attribute you set in it. It will also send a page_view event if you do not change the default behavior of the tag.
- Go to Google Tag Manager.
- Start adding a new tag
- Select Google Analytics: GA4 Configuration
- Enter your Google Analytics 4 measurement ID (also known as web stream ID)
- If you are unsure what other options need to be set in this tag, leave everything else in its default state
- Enter a name at the top of the panel (in the example below you see: GA4 – Pageview – All pages
- Save the new tag
How to test if Google Tag Manager works
- Open chrome in incognito mode.
- Go to Tag Assistant.
- Add your website.
- Click Debug Live version.
- Keep both windows open in your screen (debug and site).
- Make a purchase.
- See if the conversion is fired.
How to add Google Adwords conversion
- Open google adwords
- Go to your conversion
- Click the Use Google Tag Manager Tag tab
- Copy Conversion ID and Conversion label.
- Open Google tag manager
- Click new tag
- Select google ads conversion tracking
- Paste Conversion ID and Conversion label.
- If you see Conversion Linker tag missing in container, click the create.
- Give a name “Conversion Linker” and click save.
- In triggering, select Add trigger.
- Select page view.
- Some page view.
- Page url contains checkout/order-received
- Publish changes
- Open google adwords
- Go to your conversion
- Make a test purchase and make sure that you pass the test