Twin-Cities-Mutual-Aid / twin-cities-aid-distribution-locations

A webapp to coordinate aid and care in the Twin Cities.
44 stars 31 forks source link

Analytics: Add Outbound Link click event #184

Closed echoseekererer closed 4 years ago

echoseekererer commented 4 years ago

I would like to track outbound link clicks to better understand how users are interacting with location content. This is not something GA tracks OOTB.

Event Category: Outbound Link Event Action: Click Event Label: [full link]

Ideally we would have link classes for common link types (EG: Volunteer Signup, Donations, Contact Location, etc) to fire off DOM click events, with metadata for the location passing with the click (EG: Site Name or ID). This approach categorizes a wide array of link destinations with minimal maintenance and greater accuracy on the analytics end. If that’s possible with the current spreadsheet authoring workflow, sweet! Events would be:

Event Category: [link class] Link Event Action: Click Event Label: [full link]

If not, something to flag for #171

comeoneileen commented 4 years ago

Dallas would really like to see this happen ASAP, especially for seeing how often folks are clicking on "Donate Now" links and using the map as a tool to make financial contributions rather than items - could it be bumped up in priority?

echoseekererer commented 4 years ago

Still unfamiliar with process here and GitHub ins-and-outs. If we have a GTM container set up, if I can have access I can add and QA this ask in ten minutes. Javascript here, not so familiar with.

comeoneileen commented 4 years ago

Blurgh, not a question I can answer...and I'm not even sure who could. @jasonthibeault set up GA to begin with - Jason, is this something you can help with?

jasonthibeault commented 4 years ago

Now that it's on its own GA account, with Tag Manager set up, as far as I know following these instructions is (mostly) all that needs to happen to perform click tracking. The big problem is, I'm out of date on how the links for the paypal etc are even being built, so I'm not sure if this is easily integrateable.

https://support.google.com/analytics/answer/1136920?hl=en

echoseekererer commented 4 years ago

If we have a Tag Manager container set up, we can implement there and not have to worry about adding that link attribute.

codarose commented 4 years ago

We may still want to upgrade to using Tag Manager in the future, but for now this issue is resolved with https://github.com/Twin-Cities-Mutual-Aid/twin-cities-aid-distribution-locations/pull/209