Closed danrademacher closed 7 years ago
There might also be React or Redux specific SPA patterns out there that would be easy to use. A common need for SPAs
Looks like there are a few React GA libraries, including this one used by Mozilla: https://github.com/react-ga/react-ga
@nilesbarnes do you already have a Google Analytics account? If not would you mind signing up for one? I imagine you might already have one for the regular Greenway site but not sure if you'd like to use the same or different one for the map.
https://analytics.google.com/analytics/web/provision/?authuser=0#provision/SignUp/
We'll just need the tracking code from you, which is in the form of UA-xxxxxx-xx
where the x
's are numbers or letters I believe.
Tracking events mentioned above as well as a couple others that might be useful for the ECGA staff:
application errors: for this I had "could not find route" in mind, to help the staff identify where there are breaks in the route topology or direction encoding.
ellapsed time for a route search: if a route search is taking more than a couple seconds it could mean there are some data issues between a start and end location that could benefit from some TLC
Once I have a GA tracking code I can update the app with it and remove the temporary one I'm currently using.
Now the "no route found" error message will log the current query params in the URL. This will allow ECGA staff to copy and paste them into the app so that they may easily identify topology errors in the data.
Other app errors will be logged with the action as the error type and label as the error message.
So the react-ga library doesn't seem to be logging anything to GA, starting to investigate why that is.
Confirmed that the following are being recorded using the temporary GA account I set up:
I think the timing and page visits only display for the previous day, the others you can see being logged in real time.
Noting that I set the default URL to https
not http
so am not sure if the latter will work at the moment.
@clhenrick Here is our GA code:
UA-20533957-1
Thanks @nilesbarnes
@nilesbarnes I added your GA code to the app and redeployed it, you should see some events being logged in your GA account. Let me know if you don't see them.
I have access to ECG GA dashboard. Will work on getting events logging there. Looks like that account might need to prove ownership of the HerokuApp domain.
I just trashed the test GA account I set up, so maybe that will help.
-Chris clhenrick.io
On Fri, Jul 21, 2017 at 9:55 AM, Dan Rademacher notifications@github.com wrote:
I have access to ECG GA dashboard. Will work on getting events logging there. Looks like that account might need to prove ownership of the HerokuApp domain.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EastCoastGreenwayAlliance/ecg-map/issues/44#issuecomment-317054670, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ31BKoDEzFZePUpYI6GbSqGJ9o-P7aks5sQNgDgaJpZM4OMyHC .
Confirmed this is all working:
@gregallensworth and @tomay have both done some of this -- Tom most recently on https://github.com/GreenInfo-Network/lpi-attrition (not sure where exactly in code).
On this app, we'd want to track: