Hi there!
With our native integration with Shopify we will automatically add web tracking to your entire site if you check the box within the integration settings page. If you have concerns about the load time of your site you can choose to manually install the snippet for just certain pages on your site. You can do this following the instructions here.
Let me know if this helps and thanks again for visiting the Community!
Kelsey
Got it. Thank you for your reply. So I’m guessing I should first turn off this button in integration settings: Automatically add Klaviyo onsite javascript (recommended)
Then to set the script to only run on blog articles, would this conditional statement work:
{% if template contains "blog" or "article" %}
<script type="text/javascript" async
src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=NjDyPw "></script>
{% endif %}
@k.mcevoy it’s really unclear from both the article and the integration settings page whether I need to turn off “Automatically add Klaviyo onsite” if I’m just adding the script to the theme.liquid file for specific pages. Some guidance would be appreciated.
Hi there,
If you wanted to exclude the Klaviyo tracking from specific pages on your Shopify site you would uncheck the box within the integration settings, and manually apply the code to the pages where you would like Klaviyo web tracking to run.
That code snippet should work and only apply the Klaviyo web tracking to your blog pages.
Let me know if that helps clarify!
Kelsey
@k.mcevoy Thanks for your response. I unchecked that box and saved to update the integration settings, then pushed the theme live with the manually applied code.
It didn’t work. Klaviyo is still running on all pages (as you can confirm by running Lighthouse on any non-blog page of our site).
Is there a period of time that integration settings take to process on Klaviyo’s backend?
@k.mcevoy following up again. Since this seems to be an issue on Klaviyo’s end I’m not going to be able to solve this myself. The automatic integration has been removed but Klaviyo is still running on all pages of my site. Can you or someone on your team explain why this is happening?
Hi @IlluminateLabs, thanks so much for following up on this and going through the steps of unchecking the box for integration settings.
Another area I’d recommend checking is to see if you have a duplicate account that would add extra javascript to your theme. If you’ve previously created a duplicate account with a .io email (instead of .org), you would need to log in to uncheck the option to inject javascript within the Shopify app of the duplicate account, and then update the integration. You should also disable that Shopify integration after you’ve completed this step.
Hope that's helpful and resolves the issue with your page load times!
@k.mcevoy Brilliant, that must be it! We used to be .io but migrated to .org and it appears there’s still a .io account login. However I can’t update the integration on that account because it never finished onboarding.
Could your team possibly just delete that account entirely (associated with calloway@illuminatelabs.io)? That would probably be the most efficient way to solve this problem.
Hey @IlluminateLabs cancelling the account will not automatically remove the Klaviyo web tracking from your Shopify store. You would have to delete that script on Shopify’s end.
Could you clarify a bit more on what you mean when you say you can’t update the integration because you didn’t finishing onboarding?
@k.mcevoy I just completed the onboarding for the .io account and then removed the Shopify integration. Could you please have someone on your team delete that account?
Also I just ran my site through Lighthouse and Klaviyo is still blocking main thread work. Do you know if there’s a processing delay between when an integration is deleted on your site and when that change is actually made on Shopify?
Hi @IlluminateLabs,
We went ahead and deleted the script tag that included your duplicate company id (.io). It sounds like you disabled the Shopify integration before unchecking the box that automatically injects the javascript to your theme and clicking “Update”. You should be all set with this now!
@k.mcevoy thank you for deleting the duplicate account script. Unfortunately Klaviyo is still running on all pages. You can verify this yourself by running any page on our site through Lighthouse. Could you or someone on your team check that the integration is working on your end?
@k.mcevoy following up about this. I just manually searched through every theme file to confirm that there was no Klaviyo script on any of them except blog and article pages, and there wasn’t.
However it’s still running on all our pages. How can we solve this?
@k.mcevoy why is this being marked solved when it hasn’t been solved at all and I’m being ignored? Can someone else on your team comment on this issue which seems to be an error on Klaviyo’s end?
Hi @IlluminateLabs, our apologies that our team’s original suggestion of deleting the additional company id in your script did not work. It looks like this may be beyond the ability of our overall Community to be able to provide more feedback on, as we tried the approach of what seems most obvious. Since this may require deeper troubleshooting outside of our expertise in a Community forum, I’m going to connect you with someone from the Klaviyo team that is better suited to dive deeper on this issue with you. You should be contacted shortly via email (the one you used to create your Community account with) with additional questions and follow up. In the meantime, I’ll unmark the “best answer selected” until we hear that there’s been a resolution.
Thank you so much, and I hope you and yours had a fantastic holiday.
-Cass.
I think it is working perfectly fine now.
@cassy.lee that would be much appreciated. Thank you and happy holidays.