Share Your Work

Gib
Member

Can't manage to add a tag in the Pages Site header HTML

Hi,

 

I can't manage to add a tag in the <head> section of all my pages. 

 

I am in the Parameters->website->Pages. I want to add this tag to ALL my pages:
 

<!-- tracking -->

<script type="text/javascript">

         (function() {

                     var s=document.createElement('script');

                     s.type='text/javascript';

                     s.async=true;

                     s.src='//www.link-page.info/tracking_19723.js';

                     (document.getElementsByTagName('head')[0]

                                 ||document.getElementsByTagName('body')[0]).appendChild(s);

         })();

</script>

<noscript><p><img style="display:none" src="//www.link-page.info/tracking_19723.png" /></p></noscript>

<!-- tracking -->

 
 
Somehow there is an error when I want to Save: Hubspot displays "Error There is invalid HTML or HubL in the Head HTML"
 
Can someone help me with this?

It seems that the problem comes from the last part of the tag because if I noticed that if I delete it, then it works when I save it: "<noscript><p><img style="display:none" src="www.link-page.info/tracking_19723.png" /></p></noscript>" 
0 Upvotes
1 Reply 1
dennisedson
HubSpot Product Team
HubSpot Product Team

Can't manage to add a tag in the Pages Site header HTML

@Gib ,

The problem is coming from the content inside the noscript tag. 

In the head, it is invalid markup to have a p tag or an img tag.

You can find out more here

0 Upvotes