Skip to main content
Question

Question about Installing Page View Tracking Snippet

  • April 7, 2026
  • 2 replies
  • 24 views

Forum|alt.badge.img+1

Dear Klaviyo Support Team,

Hope you’re doing well.

We are currently trying to implement page view tracking based on the following guide:
https://help.klaviyo.com/hc/en-us/articles/360059075151

However, we are a bit unclear about some of the implementation steps, and would appreciate your guidance.

1. About “Installing the snippet”
According to the guide, we need to copy and paste the complete snippet into our page files.
Since we are using Shopify, we see multiple theme code files available.

Could you please advise:

2. About “Track Viewed Page by URL”
The guide mentions adding a script for tracking page views by URL.

Could you please clarify:

  • Where exactly should this script be added within our Shopify theme?

  • Should it be placed in a global file (e.g., theme.liquid), or within specific page templates?

We want to ensure the tracking is implemented correctly across our site.

Thank you very much for your support.
Looking forward to your reply.

Best regards,
TEA CHÂTEAU

2 replies

whereisjad
Expert Problem Solver IV
Forum|alt.badge.img+20
  • Expert Problem Solver IV
  • April 7, 2026

@teachateau since you are using Shopify why are you following the guide pertaining to custom integrations?

It should be accomplished by first integrating with Shopify as described here

Then navigating to your theme setting’s App embeds tab. Make sure the Klaviyo app embed is toggled on.


Byrne C
Community Manager
Forum|alt.badge.img+29
  • Community Manager
  • April 13, 2026

Hi ​@teachateau,

You’ll usually want to paste snippets such as this onto files that affect every page, so you can track page views on each page of your site. We usually recommend pasting this into your theme.liquid file, but it all depends on how your store is set up. Might be worth reaching out to Shopify Support, so they can take a look at your files to determine which one to paste into.

If you have any additional questions, or are still struggling with this, definitely let me know!