Skip to main content

Does anyone know how I can create a segment based on which subscribers have viewed a specific page on my client’s website? I’ve looked through properties but can’t seem to find a suitable option. 

Hi there @chloelongsoup,

Welcome to the Community!

Webpage tracking isn’t a standard feature of Klaviyo but if you want to create/custom code an event to be shared with our platform, i.e. if a profile goes to a certain page, click a certain thing, you can certainly do so by using Klaviyo’s APIs. You can read more about APIs with Klaviyo here. This is feasible with some help from a web developer.

Otherwise, if you just want to track people, I would recommend using Google Analytics. Please note that those data would be all tracked within GA and not Klaviyo. 

 

Hope that helped!
Alex


Wow. This is a common feature of ActiveCampaign for over 5 years.


interested in this too! People visiting specific pages may have things in common to trigger specific automation flows for example. agree with @brmarketing I also come from AC and this was something we used A LOT!

 


Hey @brmarketing and @lesielle,

Although this “page view” isn’t a standard Klaviyo event as @alex.hong mentioned, we do have some guidance on how to set one up from our How to create a custom viewed page metric Help Center article. 

I hope this helps!

David


Hi @David To thanks for the suggestion. I saw that guide but that method is not very flexible and need to tag page by page… Thanks anyway and hope Klaviyo will include this feature in the future.


Hey @lesielle,

You should be able to add that custom viewed page code to the header of your site which would then trigger for all pages of your site. This is similar to manually installing the Klaviyo.js - all you need is to add the snippet once. 

Additionally, as with any custom code, it is highly flexible and it’s behavior can be coded to whatever you want. 

If you need hands on assistance with implementing this solution or finding a custom one, I would recommend reaching out to some of wonderful Klaviyo Partners through the Partners Directory!

David


Hi @David To, I know to installed it but that code sems to identify a specific page “about us” for example. If I add that code to the header will trigger each time and that do not provide valuable information, it would, at maximum inform how many pages has visited someone, but not which ones.

Do you know how that code would be “filled” with the url itself”. So the code trigger each time but assign a different identification to each page that the user visits.


Hey @lesielle,

Seems like you may have missed step 5 or the How to create a custom viewed page metric article:

5. If you would like to track Viewed Page by URL instead of by page title, you can use this alternate snippet below. Note that 'page you wish to track' should include the quotations and be the URL of the page you want to track.

<script>
var _learnq = _learnq || ];
var page = window.location.href;
_learnq.push(u'track', 'Viewed Page',
{url: 'page you wish to track'}
]);
</script>

Once again, the code is highly flexible and you can even include it to track and relay more (or less) information if you want. It would all be a matter of how you adjust the code snippet. 

David


thanks again @David To , I saw that, but in the “viewed page” i need to put the URL i want to track. That means, If I am understanding correctly, that I have to add one specific page there (if that script would register each page, would be what I look for).

What I need is to track all pages being visited by a user like in Active Campaign, without the need to add a code for every page I want to track. 

Not sure I am explaining well what I need...


hi @David To any idea how to make “page you wish to track” dynamic so it register each page visited?


Hey @lesielle,

I’m not a developer so I’m unfamiliar with editing and customizing a code snippet. But with my basic understanding, from that snippet, the window.location.href function actually retrieves the dynamic page URL. 

That means, once it’s retrieved, you can pull the dynamic URL into your event response dynamically, 

If you’re uncomfortable with customizing the code snippet, I would encourage you to reach out and work alongside a developer who can offer you a custom solution. As mentioned prior, we do have a network of Klaviyo Partners who specialize in work such as this. 

David


Reply