Unusual amount of pageviews in GA4 - result of headless web? - wordpress

I manage the analytics of a website that uses a headless web, and have noticed an unusual amount of page_view events one some of the pages.
Perhaps it could have something to do with the website being headless, meaning that the URL doesn't change/refresh when clicking, even though the content on the site is changed as if it was a url redirect.
does this make sense? Anyone got any good suggestions on why my events might be off?
My first thought was that the event tracking configuration wasn't set up correctly, resulting in multiple pageviews on the wrong pages (i.e. first page visit → 2nd page → 3rd page = three pageview fires on first page), but upon investigation this doesn't seem to be the problem.
Checked for bot traffic and it doesn't seem to be that, as we're also tracking through UA and Matomo and those numbers look way more likely.

First, what you've described is not necessarily a headless website, it's just a misconfigured Single Page Application that doesn't care about updating the url. A Huge SEO issue, but not a blocker for Analytics. And when an SPA affects analytics, it's most commonly less events, not more.
If the bot traffic inflates one analytics system as a side-effect of whatever it does, it will inflate similarly pretty much any other analytics system, so if numbers in UA and Matomo look alike, it doesn't rule out bots. Especially if your GTM sends events to both systems on the same triggers.
Now, there are ways to debug it besides just going to the website and looking at a few pages tracking.
In cases like this, you want to use data to debug your tracking.
You build a report (custom report, or just use pregenerated UA reports) in which you compare the anomalous traffic period to the previous period so that you would have your base. Now, whatever dimension you're using, you're looking at the value or a few values of this dimension that contain most of the anomalous traffic. This is to see if any dimension contains the outlier that would explain the nature of the anomaly.
Dimensions that I would look at right away are: hostname, country, hour of the day, source, page, landing page, exit page, referrer. I would also take a quick look at all the conversion numbers, bounce rate and avg time on site.
If all of these look organic, then I would presume natural growth of good traffic.

Related

Bridging the gap between _gaq.push and gtag

Looking more for some fresh ideas to help me troubleshoot the below problem than solving any coding issues (which may come next).
Creating a similar site to an existing one that uses all previous GA tech (analytics.js, _gaq.push, Google_Service_AnalyticsReporting_ReportRequest(), etc) and provides all the easy data needed for my simple GA reports (i.e. page views by date and location).
However, not quite ready to bite off the whole enchilada (GTAGMgr, GA4, and such) so created dual Properties (UA and GA) as many forums have recommended when making the transition.
Setup the website same as the active [UA] site but using the gtag.js (per the Property Tracking Code snippet provided in ADMIN) vs the analytics.js code. Created View(s), new Service Account for the "user", an API Map Key for the Google Map Charts, and any other pieces I could find.
Have the GTAG.JS setup on each page and added any special page tracking via gtag('event', 'page view', {...}) but letting the default page view still occur as well.
Page view hits are coming through as expected EXCEPT the page views locations (City, State, Country, Region) are not being populated. All that comes thru is the "not set" for any location. Ironically, the old analytics.js code was still active initially and location data was being populated.
Would think if gtag.js is collecting standard page view info for the configured Property, that location data would be there as well. Am sure it is but possibly the older getReport calls need tweaking. No doubt I probably have a something not quite right but if REALTIME data shows usage, page views, etc. AND my GA Report calls are working, would think location data would be there too.
Any brainstorming ideas would be appreciated.
Thank you,
LarryG
ANSWER ... the EZ Button ... my code and calls were correct using old and [semi] new way. The majority of the problems were McAfee VPN kicking in. It is set to turn on with reboot and I do not always remember to turn it off. The first obvious clue was the realtime location for my actions were not where they were supposed to be. Also, appears Google API PHP Client has some issues with PHP7.4FastCGI.
So if you took the time to read ... check your VPN settings if you are getting an abnormal amount of NOT SETS in your GA data.
Begs the question ... with the increase in companies providing VPN services out of the box, that renders some of the tracking a moot point.
LarryG

I'm unable to run experiments accross subdomains using Universal Analytics

I'm currently running an experiment without redirect, using Google Analytics, but I'm running in some issues.
The case
I work for a company that has two websites, with two separate brands, selling the same product. Today, we are plaining a merge of the brands, one of the reasons being the low costs of maintanance.
To see how this would affect sales, we are doing an a/b test. The test consists of changing the logo of the sites, and displaying an information about the merge of brands in the variant. The original is the website without changes.
We have some requirements to do it:
We use a CMS that has no support to the Google Analytics Experiment tag (we get some errors when we install it to the , and are unable to run it)
We need to run it through all pages of our websites. We have also a subdomain in each site, that the user is redirected to place an order.
We doesn't have time to wait for the experiment to end for itself. So, we came up with the idea to track the rejection and sales using a duplicate pageview with "/variant" in the url and in the title.
To do that, I used the Content Experiments without redirects, with the Google Tag Manager.
Configuration of the Experiment
In Google Tag Manager, I load the Content Experiment Javascript API and define the choosenVariation variable in all pages of both websites and subdirectories.
I track the "gtm.load" event, to see when the page finished loading all elements and change the DOM in three ways: changing the logo, adding the content about the merge and add an item to the main menu. All of this, through Javascript.
Along with the changes of the DOM, I add a datalayer called VirtualPageView, and pass the corresponding url with "/variant" and the title with "Variant".
When the datalayer fires, I send a new Pageview with the variant information.
The problem
The experiment is running right, but when a user gets the B variant of the experiment and procceed to a subdomain of our websites to place an order, it seems that it's somehow running another test, and happens to the user get the A variation.
We are trying to persist the original session and the client Id through the domain and subdomain, in order to the user that saw the different logo, continue in his way to order.
I saw this page about Running Experiments across Subdomains, but its about the Classic Analytics and the classic experiment, and we are using the Universal Analytics with the Content Experiment without redirects.
I don't know if my explanation was clear enough, so if someone have doubts, please ask me. I don't have a profound knowledge of Google Analytics or the Content Experiments either. So, if you have a better way to do this, please, tell me.
I came up with a solution to our problem. We agreed to use the experiment only in the pages of the main domain, so I can change the content otherwise in the pages of the subdomain:
When a user visits our main domain, through Google Tag Manager, I created a cookie that says what the result of the variation chosen for the user (0 for the original and 1 for the variation).
When this user goes to our subdomain to place an order, still via GTM I check the cookie to see its value. If its equal to 1 (a variation), I change the logo and the menu, according to our previous configuration, and I send a virtual pageview to help us check the data.
Until now, this is working properly.

why track email opens as events and not as pageviews

Since a while I've been playing around with the Analytics Measurement Protocol, and also used it in some test emails as described in this article:
https://developers.google.com/analytics/devguides/collection/protocol/v1/email
But what puzzles me is that Google recommends to track email views as events, not as page views.
From one side I can see the point, but on the other hand in Google Analytics I get an alert stating that I have events without page views.
Can anyone answer me why it should be done that way, or what arguments are there that speak for it? Otherwise I could also just use the Measurement Protocol to send a page view.
I do not know why Google recommends this, but I rather suspect it's because you will skew some of your metrics if you use pageviews - an opened e-mail would count as a bounce, which in turn would bring down average time on site, pages per session etc. If you make opened e-Mail an event you can avoid this.

Google Analytics reporting data before tag is even up

So I've been working on a website for a while. GA account has been up for a couple months but I waited for the website to be finished before putting up the actual JS tag.
In the meantime, the website is being HTTP password restricted (basic authentication) so it isn't even accessible unless you know the user/pwd combination.
To my surprise, I realized today that GA has logged several hundred views to the root of my website. Paths are mostly things like:
/
/?from=http://social-widget.xyz/
/?from=http://www.traffic2cash.xyz/
Bounce% and exit% both at 100% for all of them.
I realize this looks like referral spam, and there are ways to prevent it. Came across this upon googling:
http://botcrawl.com/block-social-widget-xyz-referral-spam-in-google-analytics/
My question is: how can GA log anything anyway when no tag is up and the website isn't even accessible?
Thank you very much in advance
Because it's spam. They hit Google Analytics directly with random GA codes and don't even go through your website.
GA can't tell if these are real hits (from website visits) or fake hits (from spam bots who hit GA directly calling the same ode as they would if on the website). Though arguably they should do more about this.
Massively annoying - particularly when first starting out as this can be a heavy proportion of your "traffic".
It's easy to set up a filter rule is to catch a lot of this by filtering on hostname. As they are randomly hitting GA and don't even know what website they are hitting GA for, they don't usually set this correctly. Real traffic should only come from yourwebsitedomain.com so add a filter for that.
STRONG piece of advice: abandon the default UA-########-1 tracking code of your new website -- simply do not use it!
Create a second and third property on the Admin screen, then use the tracking code for the third property. You will immediately see a lot less spam. No filters or segments necessary!
If you want the whole sad story about spam visits in GA, I have been maintaining the Definitive Guide article for over a year now:
http://help.analyticsedge.com/spam-filter/definitive-guide-to-removing-google-analytics-spam/

Tracking displays of iframe component in Google Analytics

Site A gives their affiliates an interactive component (traffic map based on Google Maps), which they in turn put on their sites (Site B) in an iframe. The component is dynamic, doesn't change the URL of parent site, and has an id for each affiliate site.
What I would like to do is track the displays of the component. (Price of using Google Maps for the component depends on number of views).
At the moment the component is in <iframe src="http://SiteA.com/q?cp=43.520,18.910,10&cm=1"></iframe>.
I have looked at the other topics but didn't found a solution to that problem. I would really appreciate any help, I had no experience with cross-site tracking yet.
You as siteA owner want to count number of displays of iframe on other sites, correct?
The basic way to do it is logs analysis — every time your server returns page http://SiteA.com/q?cp=43.520,18.910,10&cm=1 or similar it adds an entry to your server's log files. The can be count when. There is a number of solutions for analyzing log data. Some of them opensource and free, other are paid services. For exmaple: http://awstats.sourceforge.net/
There is other ways to count it, but it's probably easiest way of all.

Resources