How can we improve WooCommerce?

Add support for Google Tag Manager

Google Tag Manager allows one to add tracking code and further triggers via a website after placing a script once. Read all about it over here:
https://www.google.com/tagmanager/features.html

I'd rather have Google Tag Manager instead of my current Canvas > Theme Options > General Settings > Tracking Code.

Google Tag Manager asks "Paste this snippet into your website template page so that it appears immediately after the opening <body> tag."
https://developers.google.com/tag-manager/quickstart

There is a WordPress plugin that allows for easy insertion of the Google Tag Manager code but it cannot place the script right after <body>:
http://wordpress.org/plugins/wp-google-tag-manager/

33 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Patrick Mackaaij shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

4 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Rebecca commented  ·   ·  Flag as inappropriate

    I just added my tag manager script using the Hooks feature in the Canvas theme. There is a hook for adding a script just after the first body div.

  • Patrick Mackaaij commented  ·   ·  Flag as inappropriate

    I removed my vote for this after experimenting with Google Tag Manager and Duracelltomi Google Tag Manager's plugin. Google Tag Manager is complex and a lot of work to setup and maintain. The plugin has its own events which should make configuration a bit easier but as its rarely used and there's not much documentation you have to dive into the setup and every tiny trigger to get a grip on what you should configure to get results.

    Although Google Tag Manager sounded great (easy for marketeers, no developer required) it's back to Yoast Google Analytics for me.

  • Patrick Mackaaij commented  ·   ·  Flag as inappropriate

    Duracelltomi Google Tag Manager's FAQ states that plugin doesn't add the code to the opening tag as well:

    "How do I put the Google Tag Manager container code next to the opening body tag?
    Go to the admin section of the plugin and select "Custom" from the placement settings. This way my plugin does not put the code snippet into the footer of the page.

    In this case you have to edit your template files. Go to wp-content/plugins/themes/<your theme dir> and edit header.php. In most cases you will find the opening <body> tag here."

WooCommerce: Category - External Product/Service Integrations

Feedback and Knowledge Base