Add Google Analytics support with custom events
Opened this issue · 4 comments
- Custom events can track any user behavior requested by TransitCenter including MSAs selected and indicators selected
Here's the list of events to track:
- Indicator selected
- MSA selected
- Years changed
The category for each event will be 'data' and the action for each will be 'selected'. Then the label should be 'indicator' / 'year' / 'msa' and the value should be the selected value.
I've added these event functions though I don't know if they're actually doing anything. Is there a decent way to test?
In general it is only sending them when something changes; so for example when you first enter MSA mode it will send the selected MSA but not the census indicator because it's still the default one, which the user didn't actually choose.
At the moment, I think there's a configuration issue with the ga
variable. I can't switch to regional mode because that's throwing an error.
Do you have the error it's throwing? It hasn't been causing that kind of issue for me, so far.