Google Analytic plugin strips code

I have just activated the Google Analytics plugin that comes with Pro/X and have found that when I input the tracking code I get the tracking URL shown in the very top of of my pages on the front end.

I have gone back to google analytics and have found out that the plugin strips some code upon saving.

What it strips out is the second line:

<script async src= until the closing script tag.

Hi there,

Would you please kindly use the old version of the code mentioned here at the moment:

The plugin does not support the Google Tag Manager code at the moment and it is already in an issue tracker.

There is no ETA on when the feature will be implemented that is why I suggest that at the moment you consider using 3rd party plugin.

Thank you.

Hi thanks ,
Have deleted plugin and went with 3rd party

You’re welcome.

I’ve had the same problem on a client website, and have burned many hours trying to get to a solution.

I understand that there’s a problem with your plugin handling the Google Tag Manager script. But what you don’t say is how to fix the problem. The page you lead us to has two options, The JavaScript tracking snippet, and down below that is a Alternative async tracking snippet. Which do we use, and how do we implement it in our X theme based websites?

Would you please provide step by step instructions?

Hello There,

Thanks for writing in! The easy solution to this is not to use the plugin at the moment. Please deactivate the Google Analytics plugin since there is no update yet and install Insert Headers and Footers plugin instead. You can insert your GA code or Google Tag manager script in the header area provided by this plugin. You can check that out here: https://wordpress.org/plugins/insert-headers-and-footers/

Hope this helps.

All set now, thanks.

Hi @tomrogers,

Happy to hear that.

Feel free to ask us again.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.