FreeUKGen / MyopicVicar

MyopicVicar (short-sighted clergyman!) is an open-source genealogy record database and search engine. It powers the FreeREG database of parish registers, the FreeCEN database of census records, the next version of FreeBMD database of Civil Registration indexes and other Genealogical applications.
46 stars 15 forks source link

Google analytics appear to have stopped functioning #1835

Closed Captainkirkdawson closed 5 years ago

Captainkirkdawson commented 5 years ago

It would appear that the google analytics are no longer functioning correctly. The number of users has dropped dramatically from 18,000 to 2500. The average session time is now 10 seconds instead of a couple of minutes. The bounce rate has climbed from 8% to 95%. At the same time of search statistics are showing the same number of searches and New Relic is showing no change in performance

Captainkirkdawson commented 5 years ago

analytics1.JPG analytics2.JPG

smrr723 commented 5 years ago

Google Analytics is still working as far as I can see - the drop in numbers is a correction back to pre-GDPR changes (May 2018). We were never actually getting 20k visitors per day - so this is working as expected. screenshot 2019-02-08 at 09 32 43

richpomfret commented 5 years ago

It looks like the 'fix' to the cookies was only just deployed on the 5th Feb - is that right @smrr723? This would explain the big drop back down to 'normal' numbers which are comparable with the previous year.

richpomfret commented 5 years ago

Did we have an original story for this analytics cookie fix? I took a look but couldn't find it (I'd be very surprised if we didn't). This is in part, why I would also like a nice/easy export of search stat data (to csv) for our projects in order to cross-check analytics. Perhaps the latter could be something for a volunteer or data-ery type to undertake?

smrr723 commented 5 years ago

Correct @richpomfret - and yes, that's the reason for the traffic returning to normal.

There was a story for this specific problem on FC2 - "Review FreeCEN2 Analytics", but not one specific to FreeREG, or FreeCEN1 (that I can see on waffle). FC1 still needs seeing to.

Captainkirkdawson commented 5 years ago

@smrr723 Sorry but if the analytics are correct then there is something wrong with our site set up. Guess I never was aware of any cookie or GDPR changes that inflated our user numbers. What caused the "inflation"? Why are we now showing a bounce rate of 98%? analytics1.JPG Why has the number of sessions exploded analytics2.JPG Which in turn has blown the number of sessions per user out to 20 analytics3.JPG

Captainkirkdawson commented 5 years ago

@richpomfret you can always see the actual number of searches graphically for the past week at https://www.freereg.org.uk/search_statistics searches.JPG You can look at the raw data since we started if you login and select the Site Statistics action stats.JPG

richpomfret commented 5 years ago

That is good to know - thanks @Captainkirkdawson

smrr723 commented 5 years ago

Reporting where I am on this:-

  1. Checked the Tag Manager implementation on FreeREG versus FreeCEN - both identical.
  2. Checked the Google Analytics setup on FreeREG versus FreeCEN - both identical.

The Analytics and Tag Manager setup on both sites seems to be the same, yet we have the discrepancy on FreeREG with the high bounce rate. The only area of code which I suspect could be causing an issue is the cookie_control.js file since cookies are how analytics data is recorded.

Looking back in Google Analytics history, the bounce rate also shot up to the same level (90%+) when certain GDPR / cookie changes were made last summer - between May & July - so it's most likely something cookie related.

Next steps are to disable the cookie_control.js file for a day or so and monitor the impact on our bounce rate.

Captainkirkdawson commented 5 years ago

@smrr723 our google analytics statistics are still meaningless with bounce rates of 95% and session duration of 9 seconds. Is there any chance you can resolve this before leaving please.

richpomfret commented 5 years ago

I believe the Tag manager has now been reverted? In which case, do we still get the same bounce issue? Vino to push reverted code.

Captainkirkdawson commented 5 years ago

Clearly is not in production. Bounce rate still at 95%

Captainkirkdawson commented 5 years ago

David Housman reported. The property was not configured to exclude freereg as a referring site. So each page view was seen as a referral from FreeREG to FreeREG, which triggered GA processing a sequence of page views as a series of single page visits instead of one multi-page visit This was inflating the bounce rate. I've updated the configuration on freereg to resolve the issue. This issue looks to have impacted session-level metrics as well as the goals on that site. I'll monitor this change going forward to make sure this seems to work properly.

Captainkirkdawson commented 5 years ago

We are back down to 16% for Monday which is the rate of a year ago but still higher than 6 months ago when it was 9%

analytics 3.JPG

richpomfret commented 5 years ago

Brilliant. Shall close this one.