perladvent / perldotcom

The source code for Perl.com website
https://www.perl.com
77 stars 80 forks source link

Fix Google Analytics #372

Open davorg opened 1 month ago

davorg commented 1 month ago

We're using Google's old Universal Analytics - which was turned off in July 2023. If we want to get anything useful out of Google Analytics, then we need to update to GA4.

It seems that the previous owners of the site set up the old version of GA. I think the best approach is to start again with GA4. And I'm happy to do that.

I'm wary, however, of stepping on anyone's toes so if someone else wants to take control of this project, please let me know. But here's my plan:

  1. Wait until Monday (3 Jun) to give people a chance to object
  2. Add a new perl.com organisation inside my Google Analytics account
  3. Add a new property for this site inside that account
  4. Edit the site (layouts/partials/header.html) to update the GA code to use GA4
  5. Sit back and watch all the lovely data come in

I will, of course, be happy to add people to the organisation so they can also see the data.

oalders commented 4 days ago

@davorg I will follow up with you about this. Apologies for my delaying the process.

davorg commented 4 days ago

@oalders Thanks. I'd also let this slip. I should have prodded (gently!)

Probably, the best way forward is for you to give me access to the GA organisation that David Farrell gave you admin on. I can take it from there. I use my Gmail address (davorg@gmail.com) on GA.

oalders commented 4 days ago
Screenshot 2024-06-28 at 11 29 51 AM

This is what I see, but it's not clear to me how to give you admin on it. 🤔 Any tips are appreciated!

davorg commented 4 days ago

Google's more detailed explanation is at https://support.google.com/analytics/answer/9305788

oalders commented 4 days ago

Thank you! I think I was missing the cog on the bottom left. I had seen a cog on the bottom right. Two cogs is confusing. You should have access now.

davorg commented 4 days ago

Oh. That bottom right cog is new. I'd never noticed it before :-)

I'm in now. Thanks.

rspier commented 4 days ago

FWIW, GA-4 is working fine, we're reusing the UA tag and piping it into a GA-4 property.

Please do not remove the UA tag.

davorg commented 4 days ago

Yes, I'd worked out that's what was happening.

Are you confident that will still work on Monday?

https://support.google.com/analytics/answer/11583528

rspier commented 4 days ago

I think so.

Image

https://support.google.com/analytics/answer/11583528#:~:text=Can%20I%20delete%20my%20Universal%20Analytics%20property%3F