Many Pies

Many Pies

Monday, March 27, 2023

Google analytics engagement time not working - how I found out the problem

A graph showing a zigzag line, but on the left hand scale the scale values are all zero. At the top it says the average engagement time is zero.

This is very niche, and is mainly of interest if you're using the Webtoffee Cookie consent plugin (there is a free version available too). However, if you're interested in debugging analytics problems, then this gives you some techniques.

The problem showed itself that the engagement time on our GA4 analytics was zero. As you can see from the graph above, not exactly zero, but certainly very small. I turned to webmasters.stackexchange.com and got a response from jen. It didn't give me the answer, but pointed me to an analytics debugger extension for Chrome. I could see that using that the engagment time (_et parameter) wasn't zero, but was a small number of milliseconds, less than 50.

I tried a number of things on the cookie plugin settings, such as putting the Google Tag Manger code into cookie categories, as recommend by this article (only for the free plugin though). That made the analytics script run when you accepted the cookies, but never after that. I tried disabling it, but it still didn't make engagement time get registered.

In the end though, the problem was that there was code in our site theme designed to work with GTM, but we hadn't been asked to do the corresponding changes in our GTM config. Once I removed that code the engagement time was a healthy number of seconds. I don't quite know why that caused this problem, but my theory is that the events it was triggering ran pretty quickly after the page loaded, and at that point the user engagement was recorded on those events, rather than when the user subsequently did something (scroll, navigate).

Other things to help with debugging

  • Chrome application tab, cookie section, has a handy clear all cookies button to the right of the filter box.
  • Make sure you enable the analytics debugger extension when trying to debug!
  • Clear the site cache after making changes to the cookie plugin settings

Friday, March 10, 2023

What's the difference between disconnecting from a remote computer and logging off?

 I put this in one of our internal chatrooms, but it may be useful generally.

Some people are disconnecting from remote computers (using Remote Desktop) and not logging off when asked. If you disconnect all your programs are still running, even though you can't see them. If you log off, they're all closed down. Disconnecting is like leaving an office with your stuff all over your desk. Logging off is like putting everything away and leaving your desk clear, before you then leave the office. I got Dall-E to illustrate these:

Disconnecting:

a woman walking out of an office door with books and papers still on the desk
Logging off

a man walking out of an office leaving a clear desk behind
To disconnect:
To log off (ok, sign out is the new fangled word for it)


Click on that icon of a person to get the sign out option

Thursday, February 02, 2023

We all have supercomputers now



Judson Rosebush, CC BY-SA 3.0, via Wikimedia Commons

I was watching a TV programme of 80s and 90s music videos the other day. I was marvelling at just how relatively advanced the video techniques and transitions were - such as the picture rolling up and zooming off the screen. In my mind I kept going round this little loop - "isn't that amazing for the time" - "but the technology I was using was so primitive" - "isn't that amazing for the time" - etc.

Then a realisation struck me as to why I was in this loop: These days I have access (though I don't use it) to such the type of technology that is used in, say, Avatar. I'm sure there's a bit of software out there that I could use that would do motion capture. I've heard of things like Blender which I could use to create 3d environments. I'd need to learn some stuff, I might want to buy some hardware to reduce render times, but it's all within my grasp.

In the 80s and 90s though, the height of what I could reasonably expect to be able to create myself (given time and skill) was Manic Miner and Doom. Those video effects came from computers like the Quantel Paintbox, which at $150,000 cost more than a house. (OK, not a fair comparison, as you could get houses so cheap then. It cost more than an expensive car.)

So, we all have supercomputers now. What are we doing with them?