This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Implementing Google Tag Manager

10 years ago · Last reply by Andrew Misplon 10 years ago

Dear All,

I’m trying to correctly implement Google Tag Manager onto my website.
I’m currently trying the Metronet Tag Manager plugin and have copied and pasted my code into the required place in the plugin settings.

Using Google’s Tag Assistant, I can see that it’s on the website (on every page) but the Google Analytics tag inside the Tag Manager doesn’t seem to work. I’ve checked back through my settings in Google Tag Manager and am certain that it’s inserted correctly and is publishing.

It seems there is lots of information about adding some code here and there in my WordPress, Origami site to make it work properly but it’s all a bit over my head. Is anyone able to help out?

Thanks.

URL: http://www.mizukitakahashi.co.uk

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

5
  1. Andrew Misplon Staff 10 years, 10 months ago

    Hi Kiel

    Thanks for reaching out.

    Have you perhaps looked at using a plugin to help with this? Here are a few to consider:

    https://wordpress.org/plugins/tags/google-tag-manager

    Alternatively, please let me know which snippets / scripts Google is suggesting be inserted into the site, we can help implement those correctly.

  2. Kiel Hanson 10 years, 10 months ago

    Hi Andrew,

    I’m currently using the first plugin on that link and have also tried Duracell’s plugin too. The Metronet plugin put the code on all of my pages but it doesn’t seem to have the Analytics code in it / it isn’t working. With Duracell’s, it only seems to add it to the homepage and doesn’t get copied to other pages.

    Here’s the code I’m trying to put in from GTM

    (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
    new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
    ‘//www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,’script’,’dataLayer’,’GTM-TTHFQ9′);

    Thanks again for the help

  3. Kiel Hanson 10 years, 10 months ago

    Actually, the code above looks different after pasting it!

  4. Magus Staff 10 years, 10 months ago

    Hi Keil

    Please use the code tags identified under the comment box at the bottom of this page. This will keep your code formatting intact. WordPress strips html tags out by default.

    Hope this helps

    Magus

  5. Andrew Misplon Staff 10 years, 10 months ago

    Thanks Keil

    Ok, so two options then. You add another plugin to handle Google Analytics. It’s a little old, but I like this plugin for it’s simplicity:

    https://wordpress.org/plugins/googleanalytics/

    For something more fully fledged try:

    https://wordpress.org/plugins/google-analytics-for-wordpress/

    Option two is you use the plugin Header and Footer scripts:

    https://wordpress.org/plugins/header-and-footer-scripts/

    That’ll let you manually insert your own scripts into the header or footer.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread