Expand my Community achievements bar.

SOLVED

Only track every second visitor

Avatar

Level 1

We want to cut down on the number of hits we're sending to AA but don't want to limit the tracking by geogrpahy. Ideally we'd be able to track some like 1 in 2 visits and if possible adjust that if we decide to only track every third visit. Think maybe we can use "Max Frequency" but not totally sure this would meet our needs. Any help and all creative ideas appriciated. 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can reduce tracking volume by sampling users, but there are trade-offs. We’ve done this before by assigning users a random number on their first visit (stored in localStorage or a cookie) and only firing the Adobe hit if the value matches a condition — say, 1 in 3.

Example logic:

var flag = localStorage.getItem('aa_sample_flag');
if (!flag) {
flag = Math.floor(Math.random() * 3) + 1;
localStorage.setItem('aa_sample_flag', flag);
}
if (flag === '1') {
s.t(); // or your usual tracking call
}


This gives consistent sampling across visits. Just keep in mind this can skew your reporting, especially for smaller segments or short-lived campaigns.

Before implementing, it’s worth reviewing your setup for inefficiencies — combining unnecessary s.tl() calls, reducing duplicate tracking, etc. We trimmed a lot of volume this way before needing to sample.

Hope that helps!

View solution in original post

4 Replies

Avatar

Community Advisor and Adobe Champion

To be perfectly honest... this doesn't sound like a good idea...  randomly not tracking users, visits or behaviours basically just makes your tracking inaccurate and untrustworthy....

 

As much as people complain about GA data being sampled, at least the sampling is based on overall traffic patterns from ALL events that occur, giving focus to the most important pages and events across the board... 

 

I mean, in theory, if you really want to pursue this, you could try using a random number generator to set a value (0 or 1 - if you want to track 50% of traffic - if they have a value, don't generate a new value use the existing) into the user's Local Storage, then only track people who have "1" set...

 

But depending on your implementation, there may be other ways to reduce server calls without losing tracking... 

 

Depending on your implementation, you might be tracking inefficiently...

  • I've seen implementations that fire a Page View, then multiple action tracking calls (one for each marketing element on the page that was loaded)..... there's no need for this... those elements could all be combined into the page view call... 
  • Cut out unnecessary click tracking... you can use Activity Map to great effect here... I get it, direct "out of the box" isn't great, the region information is hard to digest... but there is documentation about how to customize your site into meaningful regions

 

 

I suggest you first investigate the underlying issues that require you to reduce server calls, and evaluate if there are better ways to implement your tracking...

 

It the above doesn't apply, and you really just have a small contract that isn't sufficient to cover your page view traffic, perhaps you have to have a conversation about why the contract isn't enough... if you care enough about data to purchase Adobe, you don't want to actively make the data you collect untrustworthy.... 

 

Avatar

Level 3

@Jennifer_Dungan 
Totally agree, reviewing the implementation should be the first step. 
I have worked with multiple clients who are reaching their server call limit because they have bad implementation / outdated practices in place.
For example a client once had scroll tracking in place for all the pages but the content would typically load in a single view. They triggered an individual event for 10%, 25%, 50%, 75%, 90% and 100% of the screen being viewed on nearly every page load separate to the page view event.
Switching to passing the percentage of the screen being shown in to an event on page load, then using that to create and average screen view metric of page loads, reduced the number of hits drastically.
Then only triggering the scroll tracking if the page loaded with less than 100% in view provided the user with the same information but with less hits. 

Avatar

Correct answer by
Community Advisor

You can reduce tracking volume by sampling users, but there are trade-offs. We’ve done this before by assigning users a random number on their first visit (stored in localStorage or a cookie) and only firing the Adobe hit if the value matches a condition — say, 1 in 3.

Example logic:

var flag = localStorage.getItem('aa_sample_flag');
if (!flag) {
flag = Math.floor(Math.random() * 3) + 1;
localStorage.setItem('aa_sample_flag', flag);
}
if (flag === '1') {
s.t(); // or your usual tracking call
}


This gives consistent sampling across visits. Just keep in mind this can skew your reporting, especially for smaller segments or short-lived campaigns.

Before implementing, it’s worth reviewing your setup for inefficiencies — combining unnecessary s.tl() calls, reducing duplicate tracking, etc. We trimmed a lot of volume this way before needing to sample.

Hope that helps!

Avatar

Level 1

Hi Vinay,

 

Thanks very much for the constructive feedback and speaking to the question directly. This is helpful.

 

Much appreciated.