How to install Tagmanager Code in AMP version

Posted in: Newspaper
Post count: 2

Hello,

I would like to know how can I insert Tagmanager code in AMP version

Following the instructions of tagmanager I need to insert the following:

Paste this at the end of the <head> tag in your AMP page, but only if missing and only once.

<!– AMP Analytics –><script async custom-element=”amp-analytics” src=”https://cdn.ampproject.org/v0/amp-analytics-0.1.js”></script&gt;

Paste this at the beginning of the <body> tag.
<!– Google Tag Manager –>
<amp-analytics config=”https://www.googletagmanager.com/amp.json?id=XXX-XXXXXXX&gtm.url=SOURCE_URL&#8221; data-credentials=”include”></amp-analytics>

thanks in advance

Post count: 18283

Hello !

Please insert the code in here: https://prnt.sc/vbr7wh

Let us know the results !

Thank you !

Post count: 2

It works, but im afraid it will dissapear if I update the theme, how can I add this in a child version or in someway for it not to dissapear if I update.

thanks in advance

Post count: 18283

Hello !

Unfortunately for that code at the moment that is the only option. I have passed this to our developers in order to take a look and see what can be done here.

Thank you !

Post count: 4

Hi there, Is there an update on this subject?

I want to add Google Tag manager on my website: baby-kind.nl. I tried via the theme panel, but it’s not working.

Analytics code is working via the theme panel, but tag manager not. What’s the best way to implement tag manager. And please keep in mind that I want to keep the code there when the theme is updated. So I prefer to instal in child theme.

Many thanks

Best,

Post count: 21065

Hello!

You can contact our custom work team here: https://tagdiv.com/premium-customization-services/ and they will help you.

Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.