AMP Newspaper theme Google tag manager tracking

Posted in: Newspaper
Post count: 19

If I use AMP Transitional mode and Redirect mobile visitors to AMP, is that impossible for setting up Google Tag manager.
I cant see Google Tag Manager tutorial for Newspaper amp theme on google.
Installing Google Tag Manager requires two GTM installation codes for <head> and <body>

Post count: 27744

Hello,

If you want to use AMP analytics you have to add the code in Theme Panel -> Mobile Theme -> AMP => https://prnt.sc/10hunm1
Tag Manager google account should be ok if inserted in here: https://www.screencast.com/t/VIM9TBV9

Let me know the results!

Thank you!

Post count: 19

I have already added the AMP analytics code in Theme Panel long time ago.
I figure out one solution without coding, it is using Sit Kit By Google Plugin. Is that tested by TagDiv Newspaper?
Cuz I think the plugin is developed by Google. It should be okay.

Post count: 27744

Hello,

The Sit Kit By Google Plugin is untested with our theme, so we can’t say if it will work or not. You will have to test and see.

Thank you for your understanding!

Post count: 37

Hi,

Currently there is no way to implement GTM google tag manager rather than GA3/GA4, using the mobile/amp template?

I’ve been in touch with the popular GTM4WP plugin author and he’s come back with the following, with regards to using his plugin to inject the GTM AMP code.

https://wordpress.org/support/topic/is-the-amp-part-of-the-gtm4wp-plugin-supposed-to-be-working-with-wp-5-9-2/

Any ideas?

The issue is events/conversions etc cannot be tracked without the use of GTM?

Thanks!

Post count: 37

Or that should have read, more customised events.

Post count: 35449

Hi FrasL, for amp, the Google analytics tracking code need to be set here -> https://i.imgur.com/WmCNZJD.png
I hope this will help you!

Post count: 37

Hi @Calin,

The issue is, Google Tag Manager needs the script inserting slightly differently. JSON alone won’t allow this?

https://tgupta.net/analytics/implement-ga-on-amp-using-gtm/#json

Thanks

Post count: 37

Does the theme use the amp_post_template_body_open hook of the legacy AMP template? I think this may be whats required to use 3rd party plugins in order to inject the Google Tag Manager script.

Post count: 35449

Hi,
The amp_post_template_body_open hook is set in the amp plugin, so if this is the one that need to be used, then please set the code in amp > analytics -> https://i.imgur.com/GYjpdlt.png this should resolved the problem.
Let me know the results!

Post count: 37

Hi @Calin,

The GTM4WP author sounds like he’s saying the hook needs to be implemented in the template for his plugin to pick it up and insert the necessary Google Tag Manager code?

https://wordpress.org/support/topic/is-the-amp-part-of-the-gtm4wp-plugin-supposed-to-be-working-with-wp-5-9-2/

Thanks!

Post count: 35449

For the moment in our theme is not used the amp_post_template_body_open hook, this appears only in the amp plugin. Normally it should be enough, but in case that isn’t, the it will be added in the theme too.
Thank you for you understanding!

Post count: 37

I’m guessing a lot of your buyers will be wanting a tag manager analytics implementation when using the mobile/AMP version of Newspaper?

The AMP plugin will only use the a gtag set up rather than loading the GTM container itself.

It looks like GTM4WP is about the most popular plugin that caters for everything, just a suggestion.

Post count: 35449

Hi,
I added this on our list and our developers will check the suggestion.
Thank you!

Post count: 37

@Calin

Thanks for that!

Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic.