Klaviyo Web Tracking

read

Overview

Klaviyo supports two key types of web tracking:

  • Active on Site
    This metric is tracked whenever an identifiable browser visits your website.
  • Viewed Product
    This metric is tracked whenever an identifiable browser views a product page on your website (for ecommerce stores).

By enabling basic web tracking on your website, you can start to collect helpful information around browsing activity that can be leveraged to take both your email marketing and your business analytics to the next level.

2017-09-20_11-07-44.png

To enable web tracking, all you have to do is copy short snippets of code to your site.

Who Klaviyo Tracks

When you add Klaviyo's web tracking snippet(s) to your site, we are only able to track the browsing activity of "known browsers" -- i.e. browsers that have visited and engaged at least once before. Klaviyo will not track anonymous browsers. 

There are three key ways Klaviyo will be able to identify a site visitor for web tracking purposes:

  • If someone has, at some point, clicked through a Klaviyo email to your website
  • If someone has, at some point, subscribed/opted-in through a Klaviyo form
  • If someone has, at some point, logged into your site and you have identify tracking installed

For this reason, until you start sending emails with Klaviyo and start growing your lists, you probably won't see a lot of tracked web activity. Over time, Klaviyo will be able to identify more and more of your contact-base and your web tracking data will become more comprehensive.

Once a user is identified, the web cookie will last 2 years.

Active on Site Tracking

Klaviyo's standard website tracking takes the form of an Active on Site metric. When web tracking is installed, this metric gets tracked whenever an identifiable browser visits your website. Ways you can leverage this metric:

  • Segment your contacts based on engagement level
    By gaining insight into how contacts are interacting with your website -- how often, what pages they view -- you can build a more personal communication strategy that drives deeper engagement.
  • Trigger an automated email to those that browse several times without purchasing
    While you don't want to send someone an email every time he/she visits your website, you might want to send a light touchpoint to those who visit several times in a short period of time but don't engage further. For example, you can trigger a flow to those who have been Active on Site at least 4 times in the last 30 days, but haven't started or completed a checkout.

To start tracking this metric, copy the following code snippet to your site's main template:

<script type="text/javascript">
  var _learnq = _learnq || [];

  _learnq.push(['account', 'API_KEY']);

  (function () {
  var b = document.createElement('script'); b.type = 'text/javascript'; b.async = true;
  b.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'a.klaviyo.com/media/js/analytics/analytics.js';
  var a = document.getElementsByTagName('script')[0]; a.parentNode.insertBefore(b, a);
  })();
</script>

Where you see API_KEY, you will need to replace this with your Klaviyo account's public API Key. To find your public API Key, navigate to Account > Settings > API Keys.

2017-09-20_11-10-55.png

Viewed Product Tracking

Viewed Product tracking in Klaviyo is specifically designed for ecommerce stores. When product page tracking is installed, a Viewed Product metric will get tracked whenever an identifiable browser views a product page on your website.

The code snippet for Viewed Product tracking is different for each ecommerce platform:

Viewed Product tracking is most often leveraged to trigger a browse abandonment flow

Test Web Tracking

After adding the relevant code snippets to your site, you can test that tracking is set up properly by following these steps:

  1. Navigate to your website
  2. Add the following to the end of your store url, replacingemail@example.com with your email address:
     ?utm_email=email@example.com
  3. After your reload the page, search in Klaviyo for your email address

You should see that a Klaviyo profile has been created for you (if one didn't exist already) and that this site visit has been tracked on your activity feed.

Over time, to see a live feed of all tracked activity for the Active on Site and Viewed Product metrics, you can navigate to the Activity Feed tab of your dashboard. Here, you can filter for the metric of your choice:

2017-09-20_11-21-51.png

You can also navigate to the Metrics tab of your account and click on each metric to analyze tracked data through charts, graphs, and cohort reports.

The _ke Parameter

When you have email to website tracking enabled and have Klaviyo's main web tracking snippet on your website, Klaviyo will be able to identify individuals that click through a Klaviyo email and then end up browsing your website. This is one of the main ways Klaviyo is able to identify new site visitors and cookie them so they get identified during all future visits to your page.

The way Klaviyo's email to website tracking works, we add an additional parameter to all URLs in your email. This is the _ke parameter. The unique encoded value here is then decoded by our web tracking snippet and allows us to identify the user that clicked through the URL.

This parameter is automatically appended and will not impact the load times of your links nor break any links based on its placement.

2017-06-02_12-50-37.png

Was this article helpful?
4 out of 6 found this helpful