Close this search box.
Close this search box.

How to add Google Tag Manager (GTM) in WooCommerce for counting conversions

Create a Google Tag Manager acccount for the site

  1. Go to Google Tag Manager.
  2. Create a new account (add site, ect.)
  3. Copy the Google Tag Manager ID
  4. Click the Google Tag Manager ID on the top right and copy both codes
  5. Login to your site and add them (eg. by using elementor custom code)

Install and setup GTM4WP

  1. Login to WooCommerce
  2. Install and activate GTM4WP
  3. Go to plugins page and click Settings right down of the plugin
  4. Insert your Google Tag Manager ID
  5. 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.

  1. Go to Google Tag Manager.
  2. Start adding a new tag
  3. Select Google Analytics: GA4 Configuration
  4. Enter your Google Analytics 4 measurement ID (also known as web stream ID)
  5. If you are unsure what other options need to be set in this tag, leave everything else in its default state
  6. Enter a name at the top of the panel (in the example below you see: GA4 – Pageview – All pages
  7. Save the new tag

How to test if Google Tag Manager works

  1. Open chrome in incognito mode.
  2. Go to Tag Assistant.
  3. Add your website.
  4. Click Debug Live version.
  5. Keep both windows open in your screen (debug and site).
  6. Make a purchase.
  7. See if the conversion is fired.

How to add Google Adwords conversion

  1. Open google adwords
  2. Go to your conversion
  3. Click the Use Google Tag Manager Tag tab
  4. Copy Conversion ID and Conversion label.
  5. Open Google tag manager
  6. Click new tag
  7. Select google ads conversion tracking
  8. Paste Conversion ID and Conversion label.
  9. If you see Conversion Linker tag missing in container, click the create.
  10. Give a name “Conversion Linker” and click save.
  11. In triggering, select Add trigger.
  12. Select page view.
  13. Some page view.
  14. Page url contains checkout/order-received
  15. Publish changes
  16. Open google adwords
  17. Go to your conversion
  18. Make a test purchase and make sure that you pass the test