Huge issue: single post infinite load causes GA4 to over-inflate page views

Posted in: Newspaper
Post count: 144

Hi TagDiv team. I just discovered a HUGE issue that is going to impact all of my media clients. We have been using infinite load for single posts to great success … so we thought.

However, I just discovered that when infinite scroll triggers, it loads three (or more?) additional articles … each of which trigger a GA4 pageview event. That’s a big problem because it is drastically over-inflating my clients’ GA4 pageview data and loading ad impressions that no one ever sees, lowering my clients’ ad click through rate (CTR).

Here is a Claude-assisted analysis I did looking at network-level events on one of my client sites. It might help you.

The solution would be to only load ONE new post at the bottom of a post, then load another new post at the bottom of the second post, and so one. The problem is when we preload MULTIPLE posts at the end of the first post.

Please let me know if I can be of any assistance. Most of my client site are geo-blocked to just the US and Canada, so we can open one up to you if you’d like.

Post count: 144

More information from one of the devs I work with:

——

The issue was that the main Google Analytics tracking code was being initialized more than once during TagDiv’s Infinite Scroll process.

Originally, GA4 was loaded directly from PHP. That worked correctly on the initial page load, but when TagDiv loaded additional articles through AJAX, that same GA4 initialization code could run again. Each time GA4 was initialized, it automatically created another page view even.

For the test on staging server, the main GA4 initialization was moved into a separate JS file and added checks: (\Newspaper-child\js\ga4-init.js)
GA4 initializes normally once on the initial page load.

If the page being loaded is a TagDiv AJAX/infinite-scroll request, GA4 is not initialized again.

When the reader actually scrolls into the next article and TagDiv changes the URL, the normal Infinite Scroll page view still fires.

The result is that we now get one page view for the initial article and one page view for each additional article, without the extra page view that was previously being generated when the url changed.

It will be interesting to see what TagDiv says about this.

Post count: 20685

Hi,

Infinite loads for posts loads one post at a time once the previous post ends. The new posts are loaded with ajax in an iframe. And they are loaded entirely, the head content is loaded as well, meaning that this could indeed happen since the analytics code is loaded in the head.

However, I have so solution for this issue unfortunately. The infinite load feature was built a long time ago, and for now there aren’t any plans to rework it. I’ll mark it for further testing, maybe something could be done about it in a future update. Hopefully a solution can be found.

Thank you!

Post count: 144

I understand that you don’t have current plans to rework this, but that means that every publisher using TagDiv Newspaper or Newsmagazine is getting heavily inflated and false data from Google Analytics. This seems like a very important issue to fix for all TagDiv customers. How can we help push this up the queue to tackle? I’m more than willing to help fund this effort if needed.

It not only impacts Google Analytics, but also OneSignal integration (the bell icon), privacy / compliance systems like Iubenda, Meta / LinkedIn remarketing tags, and many other tags that media companies rely upon for analytics, remarketing, and compliance.

  • This reply was modified 1 week by nearview.
  • This reply was modified 1 week by nearview.
Post count: 20685

Not everyone. That issue happens only when using infinite load for posts. But we’ll see what we can do about in the next theme update, it’s a priority issue. We are very sorry for the situation.

Post count: 144

You’re right, Simion … it only affects people using infinite load for posts. I do appreciate you all taking another look at this, however. If you’d like, I have two VERY strong WP developers that I work with that have been taking an in-depth look at this. I would be glad to connect you with them when you’re ready to look at this. Perhaps they can provide some info that would be helpful. Just ping me direct via my forum registered email address. Cheers!

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.