This is all working, but we still need to work out the fact that pageview calls to Segment and GA are happening before the page has finished rendering. This means the page title and some items in window.location aren't available yet (all of which analytics libs use to automatically track page details).
For now, the details are manually passed into the Segment pageview calls, but the page title will always be equivalent to Meteor.settings.public.redoc.title. I tried running that code in a bunch of different places, but the onUpdate() callback was the only place that reliably ran on every route. So maybe someone more familiar with React Router than me can take a look and see about fixing that timing stuff.
This is all working, but we still need to work out the fact that pageview calls to Segment and GA are happening before the page has finished rendering. This means the page title and some items in
window.location
aren't available yet (all of which analytics libs use to automatically track page details).For now, the details are manually passed into the Segment pageview calls, but the page title will always be equivalent to
Meteor.settings.public.redoc.title
. I tried running that code in a bunch of different places, but theonUpdate()
callback was the only place that reliably ran on every route. So maybe someone more familiar with React Router than me can take a look and see about fixing that timing stuff.For now, at least Segment works! :)