• Resolved betterend

    (@betterend)


    Hi,

    I’m a bit confused about Container code placement, what is the best option to choose?

    Currently i selected custom and placed <?php if ( function_exists( ‘gtm4wp_the_gtm_tag’ ) ) { gtm4wp_the_gtm_tag(); } ?>

    after the opening <body> in all pages using tracking code manager to insert the snippet.

    Will that be ok?

    Is there any other and better way?

    Thank you

    • This topic was modified 6 years, 1 month ago by betterend.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Custom is the safest way to add the container code but it is important to see that nowadays this only decided where to put the so called noscript part of the code. The main container code will be added to the right place anyway.

    On your site, codeless should be safe as well.

    Thread Starter betterend

    (@betterend)

    Hi,

    Thank you for your kind support and reply.

    So i can stay on Custom with the snippet insert right?

    Just in case i put the settings on Codeless, i should remove the code snippet i added right?

    Thank you,

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Yes, you can keep using custom of course just make sure that theme updates do not remove this added line of PHP code or make sure you re-add this line after a theme update ??

    If you switch to codeless, you should remove that line but my plugin has a protection that makes sure the noscript part of the container code is only outputted once.

    Thread Starter betterend

    (@betterend)

    Thank you a lot for your kind support ??

    Thread Starter betterend

    (@betterend)

    Hi again,

    Kindly, I have installed Google tag assistant extension on Chrome and it mentions in the TAG ASSISTANT REPORT after recording “Same web property ID is tracked twice” for google analytics.

    And in the GOOGLE ANALYTICS REPORT it mentions something about the duplicate firing events.

    Thank you

    Plugin Author Thomas Geiger

    (@duracelltomi)

    This is because you have a Google Analytics tracking code in your site code that has been added either manually or via another plugin. If you remove this GA tracking code, all those messages will disappear

    Thread Starter betterend

    (@betterend)

    Thank you a lot for the clarification and quick support ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Container code placement’ is closed to new replies.