huboard / huboard-web

GitHub issues made awesome
https://huboard.com
61 stars 26 forks source link

Analytics correlation is still not working correctly #313

Closed dahlbyk closed 8 years ago

dahlbyk commented 8 years ago

254 doesn't seem to be working as we hoped it would. We should ping Segment support to see if there's any way to fix this.

dahlbyk commented 8 years ago

Response from support...

Segment does not send anything for the session calculation, actually. When an analytics.js method is called, it leverages end-tool native libraries to make the request.

In this case, GA is setting its own cookie and passing that with the requests. This is how they determine calls are coming from the same place.

Visit GA's docs for more info on how they calculate sessions and you can check out our own article on why Segment does not provide a session API.

So...if we want goal tracking we have to track everything client-side.

In a past life we handled this by queuing up events to fire in session and then flushing that queue in non-redirect responses (first in the shared page layout, but eventually with a JSON payload convention as well). Presumably we would want to flush the queued Segment events before firing the current page's events.

discorick commented 8 years ago

In a past life we handled this by queuing up events to fire in session and then flushing that queue in non-redirect responses (first in the shared page layout, but eventually with a JSON payload convention as well). Presumably we would want to flush the queued Segment events before firing the current page's events.

Would love to discuss this further

Another option would be (for the time being) add click handlers for the login/board create pages that send page() calls for the "meta-pages" When we redo the dashboard all the code can get rolled into whatever framework we build it on.