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

Enable tracking of search via google analytics #166

Closed crhistianramirez closed 4 years ago

crhistianramirez commented 4 years ago

What

@jdalt was kind enough to reference this resource which was helpful in figuring this out. In that document is a library called autotrack that enables this kind of stuff for you automagically.

For now I'm just adding the urlChangeTracker plugin but we can pretty easily add any other other plugins we want if we think they're applicable.

Why

Lets us make more informed decisions on what features to build next.

Ensure the following interactions work as expected. Please test using a mobile form factor.

Check the app in the following web browsers:

jdalt commented 4 years ago

@crhistianramirez I ended up merging #167 which had similar changes in regards to Analytics. I think the way search is tracked in that PR is as an Event whereas it is done as a Page View in this one. If the Page View is a much better option then I'd ask that you make the case and consider updating this PR or opening another.

I also like the clean up you did with DomPurify. If you could merge master back into this PR or open a new one to get those changes I'd gladly merge it.