DemocracyLab/CivicTechExchange

Google Analytics Cleanup

Opened this issue · 3 comments

This is a follow on to PR #1067

  • Verify that PR#1067 is working
Open here for instructions
  1. Got to the https://democracylab.org/companies
  2. Click on the <Sponsor our Platform ...> tab
  3. Click on the <Host a ...> tab
  4. Click on the [Get Started] button
  5. Scroll back up an click on the "Corporate Tech-for-Good Hackathons PDF " link to download the PDF.
  6. Go to Google Analytics for the democracylab.org GA4 property, and go to the real time overview.
    This might get you there: https://analytics.google.com/analytics/web/#/p375510764/realtime/overview
image
  1. In the Event Count by Event Name card, look the events below. There is a delay between when you generate the events and when they show up on the page.
  • tab-sponsorship
  • tab-hackathon
  • contact-hackathon
  • HackathonProspectus

When you see these, it's a success!

  • Both GOOGLE_PROPERTY_ID, corresponding to gtag in google analytics, and GOOGLE_TAGS_ID corresponding to google tag manager are set in production. Generally we should use only one, but in this case it looks like the GOOGLE_TAGS_ID is not managed by the democracylab google analatics or google tagmanager account. This may correspond to a previous volunteer's account.

  • We should turn off GOOGLE_TAGS_ID (but keep the ID in a safe place) and verify that we still get google analytics that we are using now. If we stop getting realtime data, then there is some other issue and we can put back the GOOGLE_TAGS_ID .

  • Rework metrics.js to work with google analytics,

  • Google analytics is already sending some information, and we should consider the effect of redundancy and overload

  • for some things, mertics.js passes userId in events, Google has additional legal requirements if you are passing user identifiable information and we need to discuss at the high level if we need this and have the right stuff in our terms and condidtions.

  • PR #1067 made a specific change to common/components/controllers/CorporateHackathonController.jsx , and this should be factored out or updated to match the new solution.

I'd love to take on this if its avail. thanks!

@aatudaboss thanks but this is a second step that I am working on but waiting for the previous step to be deployed in production before I can deploy this one.

@marlonkeating the google tag changes of #1067 are working great. As a next step, can you disable the GOOGLE_TAGS_ID (currently GTM-MBD5H4V) in production. Then check google analytics and just verify that realtime data is still flowing in -- or let me know and I will look at it. If it's not flowing, then we just put the key back. What this will prove is that the google tag manager data is going to some other google analytics accounts, and not to democracylabs'. FYI @mfrischmuth