Re: Adding tracking script to every page

Solved

How can I add a tracking script to every page quickly?

JustG
New Member
4 0 0

Hey guys,

Sorry for the newbie question but I've just added a tracking app and it's asking me to put a specifc code on every page. Is there a way I can paste it into .liquid to do it quicky? Thanks in advance for the advice!

Accepted Solution (1)
suyash1
Shopify Partner
9952 1235 1573

This is an accepted solution.

@JustG - any screenshot of the  code?

 

most probably it is javascript and put it before </head> in theme.liquid file

Amazing chess game | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.

View solution in original post

Replies 9 (9)

suyash1
Shopify Partner
9952 1235 1573

@JustG 

 

if it needs to be put on every page then it needs to be put it before </head> or </body> in theme.liquid, what does the app say?

Amazing chess game | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
JustG
New Member
4 0 0

Thanks for getting back to me. It says:

"Place the following tracking code on all pages of your site. The code is asynchronous and will not block your page from loading."

I'm not quite sure what that means.

Mirokuwu
Shopify Partner
16 2 1

theme.liquid display on every page of your site, so just put it in theme.liquid

suyash1
Shopify Partner
9952 1235 1573

This is an accepted solution.

@JustG - any screenshot of the  code?

 

most probably it is javascript and put it before </head> in theme.liquid file

Amazing chess game | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
JustG
New Member
4 0 0
<script type='text/javascript'>
window.__lo_site_id = 264508;
 
(function() {
var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wa, s);
  })();
</script>
suyash1
Shopify Partner
9952 1235 1573
yes put it in theme.liquid file before or if you find it difficult
then please add me to staff, you can contact me on given details below.
Amazing chess game | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
JustG
New Member
4 0 0

Thank you! I think that's in okay now. 

Much appreciated 🙂

suyash1
Shopify Partner
9952 1235 1573
sure, if you need anything, let me know. I will help to the best of my
knowledge.
Amazing chess game | To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
zayan
Visitor
1 0 0

Thanks for your suggestions, I also have a tool based tracking site. For more info, you can click here.