We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to add a pixel to only one page on my store?

Solved

How to add a pixel to only one page on my store?

storetool
Excursionist
16 0 7

I'm trying to add a pixel to only a single page on my shopify store. The purpose of this pixel is to filter out bot traffic coming in from ruining ad costs and I've connected with a third-party app for this. The problem is that I don't know how to add a pixel to a single page (specifically my home page).

I'm doing this via a manual pixel set up on Tiktok ad platform, and I have the pixel code ready. Just don't know the extra coding to only apply it to my home page. Any help is greatly appreciated. 

Thanks all.

Accepted Solution (1)

PageFly-Amelia
Shopify Partner
626 165 238

This is an accepted solution.

Hello @storetool 

This is Amelia at PageFly - Shopify Advanced Page Builder app.

 

You can try the following steps I have provided to help you solve the problem you are facing:

Step 1: Online Store -> Themes -> Edit Code

Step 2: Choose file theme.liquid

Step 3: Add code above the tag </head>

{% if template == 'index' %}
add your pixel code here
{% endif %}

 

Hoping my solution helps you solve your problem.

Best regards,

Amelia | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Reply 1 (1)

PageFly-Amelia
Shopify Partner
626 165 238

This is an accepted solution.

Hello @storetool 

This is Amelia at PageFly - Shopify Advanced Page Builder app.

 

You can try the following steps I have provided to help you solve the problem you are facing:

Step 1: Online Store -> Themes -> Edit Code

Step 2: Choose file theme.liquid

Step 3: Add code above the tag </head>

{% if template == 'index' %}
add your pixel code here
{% endif %}

 

Hoping my solution helps you solve your problem.

Best regards,

Amelia | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 
➜ Weekly updated Shopify tutorials on YouTube 


All features are available from Free plan. Live Chat Support is available 24/7.