2.1K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
Guide Me

Events stop appearing after several hours

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi, we have a digital signage solution, Google Analytics is already installed in our system, and we would like to improve it’s measurement and fix some reporting issues.

We have an editor interface where our users can create custom content that they run on their mobile devices, tablets, mostly android based, with our client software, in an embededd webview. In structure the contents are similar to what you can create in MS Power Point, consisting multiple slides, alternating after a set time, or certain events, but they are coded in HTML/JS/Angular. Our content implementation runs the slides without any browser navigation change, only using internal states, changing the page DOM, so it needs to be able to run for a very long time intact.


Our intention is to measure our customers’ content usage, in a breakdown of how much time is spent on each slide in a content. When we load our contents on the devices to test the reports they send to GA, initially they do report seemingly well as expected, but after some time, usually few hours, the reports stop coming in GA from the devices we were testing.


Based on our logs, the sending of these reports don’t stop after few hours, or ever, but the reports are not appearing in GA after some time, usually several hours.


Here are the GA codes used in our contents:

In the main html file’s header:

    var _gaq = _gaq || [];    _gaq.push(['_setSessionCookieTimeout','31536000000']);

    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

<script>||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;    ga('create', 'UA-82486724-1', 'auto');
<script async src=''></script>

At the initialization of the content, ran exactly once:

ga('set', 'userId', userId);ga('send', 'pageview');

where userId is a unique id combination of the current user and the current content.

And because the pageview event is only sent once at the start of the content, I manually send an event for each slide change:

ga('send', 'event', 'Pages', 'page load', pageName, pageLength);

where pageName contains the current slide’s title, and pageLength is the duration of the slide in seconds, always rounded integer.


This is a test content I made for GA reports:

There are 3 pages on the content that follow each other, and they last for 10, 20 and 30 seconds, then restart. In this example the userId is set to “CUSTOMER_1_CONTENT_740eeb8ee3f64404ba1c5503c9389adb”. The durations in this example are preset, but some contents allow user navigation, and we would like to measure how long the users are on certain pages.


This test content is being ran on a set amount of devices only, in our office, so we can exactly determine the expected reports we would like to see in GA from this controlled environment. The slide names sent in the event are purposefully set unique, so we can easily filter them in GA.

Again, our main issue here is that based on these tests, the expected and the received reports are not just different in an error margin, but they are clearly wrong, because the number of those events received drops to 0 after some time, while we can see that our devices do still send those reports.


Any tips would be appriciated about what can affect the reporting to fail.