Analytics
2K members online now
2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Universal Analytics code error...Your HTML contains some tags that are not permitted

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

I have enabled universal analytics on my google site. There is a tracking code that I've placed on my google site (see below) but I get an error that says  Warning. Your HTML contains some tags that are not permitted. These have been removed from your changes. I've also replaced the UA-xxxxxxxx with my tracking ID

 

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-xxxxxxxx', 'auto');
ga('send', 'pageview');

</script>

1 Expert replyverified_user

Re: Universal Analytics code error...Your HTML contains some tags that are not permitted

Rising Star
# 2
Rising Star
If you are using Google Sites you need to follow these instructions to add Google Analytics tracking:

https://support.google.com/sites/answer/97459?hl=en

Beginning at "Linking your Google Analytics account and your Google Site"
_________________________________________________________________________
Director of Marketing | Nehmedia | Partner Profile

Re: Universal Analytics code error...Your HTML contains some tags that are not permitted

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
I've already added the tracking ID on my google site & chose Universal Analytics. I can see some website traffics but I want to be able to track each web page.

Re: Universal Analytics code error...Your HTML contains some tags that are not permitted

Rising Star
# 4
Rising Star
That will track all visits to any web pages on that Google Site.
_________________________________________________________________________
Director of Marketing | Nehmedia | Partner Profile

Re: Universal Analytics code error...Your HTML contains some tags that are not permitted

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
I have the same problem: I cut and paste the Universal Analytics tracking code into the html of my webpage and get the message "HTML content will be modified
WARNING: Your HTML contains some tags that are not permitted. These have been removed from your changes." When I check the HTML code for the page, the tracking code isn't there.

I don't find your answers address the question. I have followed the instructions to add Universal Analytics, namely "To get all the benefits of Universal Analytics for this property, copy and paste this code into every webpage you want to track." The problem is the html is rejected when the code is pasted into the page.