reactioncommerce / redoc

redoc - generate documentation from multiple project repos.
GNU General Public License v3.0
20 stars 11 forks source link

add Segment integration and pageview tracking #19

Closed jshimko closed 8 years ago

jshimko commented 8 years ago

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.

For now, at least Segment works! :)