1

We're currently walking the fine line between gathering as much data about the user journey and interaction with the site - and also being aware of our 500 or bust limit that GA analytics imposes on us.

Does anybody know of an approach that we can discover within GA - after the ceiling of 500 hits in one session has been reached - maybe a metric or dimension we can interrogate within the GA report?

Is there anyway to debug within client side JavaScript - the current hit counter - it must be available somewhere? What would be amazing is a way to keep a track of this count number - and then throttle back less essential GA events via GTM.

  • Does this limit exist for the paid version of GA too? – Sandy Lee Mar 19 '18 at 17:37
  • Hi Sandy - yes it does. Apparently it is part of the Universal Analytics tracking client side code - so I'd like to dig into it to understand how we can keep a track of what the remaining hits are. – Wayne Foster Mar 20 '18 at 10:24
  • Thanks! I didn't know that. Sorry I can't help you here. – Sandy Lee Mar 20 '18 at 13:01
  • I'd think that you would either have to have very long sessions or send excessive numbers of events to hit a 500 per user limit. Even if sound 10 events per page, your users could view 50 pages before hitting the limit. – Stephen Ostermiller Mar 20 '18 at 18:18
  • Stephen - the metrics we have for this particular site do indeed need such a long line of hits. Does anybody know how to track the counter? – Wayne Foster Mar 21 '18 at 13:57
1

I do not know about a server site solution, but I can give some tips how to measure effectively how to keep an eye on this. Since Google Analytics already gives you the option to use “Hits” as a metric you only need a dimension about the session to pair up with. We did this by an example of Simo Ahava (https://www.simoahava.com/analytics/improve-data-collection-with-four-custom-dimensions/). Creating a custom dimension containing a unique ID for a session (session scope) does enable you to see how many hits there are per session. You will even get a better overview of what happens, when and by whom if you install all 4 of the custom dimensions suggested by Simo.

You then can create a powerful custom report to keep track of limits.

1

My latest solution was to capitalize on cookie counter which was trigger as "Cleanup Tag" after heavy hit tags such as Product Impressions, Review Impressions ... etc. There was a limit set up for 350 hits so the session hit count wouldn´t be overloaded.

Code used follows:

<script>
  (function() {
// read the cookie
var daCounter = {{COOKIE.viewcount}};
// if empty
if (typeof daCounter === "undefined") {
// start counting
daCounter = 1;
} else {
// otherwise add 1
daCounter++;
}

// than crate a cookie
setSessionCookie("DA-VC", daCounter);

})();

//function to set a cookie
function setSessionCookie(name, value) {
var cookie = name + "=" + value + "; path=/; domain=." + location.hostname.replace(/^www\./i, "");
 // set it
document.cookie = cookie;
}
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.