How do I add Google Tag Manager to my site?

williamf
williamf Member Posts: 14

I have added my Google Analytics tracking code, but would like to add Google Tag Manager instead to manage adding tags to my site, how do I do this?

Best Answers

  • Bruce_McCaughan
    Bruce_McCaughan Member Posts: 124 Learner
    Answer ✓

    Get the two (2) pieces of code that GTM generates for you (for the container), and paste BOTH into the Body end HTML box within Duda admin.

    SEO & Settings ➜ HEAD HTML

    Google will tell you to put 1 in the HEAD and one in the body, but with Duda, just put both in the Body end box. It works fine.

    Make sure you remove any analytics codes you previously placed in:

    SEO & Settings ➜ GOOGLE ANALYTICS

  • williamf
    williamf Member Posts: 14
    Answer ✓

    @Bruce_McCaughan and @Aj_Cre8 Thank you.

  • Bruce_McCaughan
    Bruce_McCaughan Member Posts: 124 Learner
    Answer ✓

    Hi, the "dpage_view" trigger attribute is NOT "essential".

    It was an optional trigger for Universal Analytics. It just automatically brought tracking for Duda elements (forms and click to call info) into your Google Analytics (universal).

    My preference is/was to not use those and create my own tracking within Google analytics.

    That said, I *believe that for GA4, there is no such special trigger. So you definitely don't need/can't-use that. And since UA is being retired, you'd want to only be setting up GA4 anyhow.

    Cheers,

  • Bruce_McCaughan
    Bruce_McCaughan Member Posts: 124 Learner
    Answer ✓

    I am not aware of any "updates" or changes.

    But, yes, if you have installed Analytics via tag manager, you need to remove the ID from the place in settings.

Answers

  • Aj_Cre8
    Aj_Cre8 Member Posts: 630 MVP

    Going to echo @Bruce_McCaughan . His solution is accurate

  • Davide
    Davide Member Posts: 6

    @Bruce_McCaughan I'm sorry if I intrude:) I read that besides pasting the scripts in the section you indicate, it is also essential to associate the dpage_view trigger to the tag to activate it? I ask this because despite having done this too, if I ask for debug on tag assistant it tells me that it is not connected, where am I wrong? Thanks

  • AudriSmith910
    AudriSmith910 Member Posts: 3

    @Bruce_McCaughan I tried pasting both codes in the body end box and GTM stated it couldn't find the second code. Was there an update that requires I put the code somewhere else? I noticed I had the Google Tag ID in the Google Analytics section. Would that effect this?

  • jen_woslager253
    jen_woslager253 Member Posts: 1

    I could really use some guidance… Did I do this correctly? I am so new with GTM and Digital Marketing. I have so many questions and this is the first time I have had to do the GTM on a website. Please email me and let me know…. I added the GTM on line #4

    jen@integritypnw.com

  • Thomas_Connery
    Thomas_Connery Member Posts: 226 MVP

    Hi @jen_woslager253 you'll want to review this article. https://support.duda.co/hc/en-us/articles/1500001598522-Google-Analytics-Integration

    I would learn to setup GTM, GA4, and GSC for every website you build.