Jump to content

Making code not visible on live website

Recommended Posts

Hi, 

I have the following code added for tracking purposes. 

<html>
  <body>
    <footer> window.lintrk('track', { conversion_id: 10423516 });</footer>
  </body>
</html>

However the code is appearing at the bottom of my live page. 

How can I make this invisible? 

Screenshot 2023-01-11 at 11.49.35 am.png

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

The reason that it is visible is that you are instructing the code to appear in the <body> of the website, that's not necessary for tracking. You want to label it as a script and add it to the footer code injection like this:

<script>window.lintrk('track', { conversion_id: 10423516 });</script>

Don't add <html>  <body>   <footer>

Give me a thumbs up if that worked, thanks!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
🔌
 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 Did I help? Buy me a coffee?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.