Mobile app version of vmapp.org
Login or Join
XinRu657

: How do I add Google Tag Manager on Blogger? I tried to paste the code generated through Google Tag Manager to my blog and I verified that the code was copied exactly, but always I get the

@XinRu657

Posted in: #Blogger #TagManager

I tried to paste the code generated through Google Tag Manager to my blog and I verified that the code was copied exactly, but always I get the same message error:


"The reference to entity "l" must end with the ';' delimiter"

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @XinRu657

1 Comments

Sorted by latest first Latest Oldest Best

 

@Murray155

I found this from Claudia

This is a problem with blogger and GTM - blogger parses everything as XML which causes problems with the GTM tag.
Try the following:
In the code of your container tag you should see this line

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=


replace that line with this line - the change is highlighted in bold

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=


Then copy the adjusted code in your blogger template and save the template - it should work now. When you then check the source code of the website you can see that the '&' has been changed back by blogger to the correct '&', so the code that is actually included on the website is exactly the code that GTM requires.

Source

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme