okgrow / analytics

UNMAINTAINED! - Complete Google Analytics, Mixpanel, KISSmetrics (and more) integration for Meteor
https://atmospherejs.com/okgrow/analytics
MIT License
213 stars 61 forks source link

SegmentIO is not loaded properly, so events are not passed to destinations. #211

Closed Macbit closed 5 years ago

Macbit commented 6 years ago

Background: I run a Meteor app and it is connected to SegmentIO via okgrow. I can see that the events are being fired from the sources and are caught in Debugger in Segment's dashboard, so it should work fine. However, these events are not sent to Google Analytics or Facebook Pixel. I contacted the SegmentIO support and after 5 days of ping-pong emails, that's their reply below:

Hi Anton, We've actually seen many customers in your same situation using the okgrow repo. For all of them, the events were arriving at Segment but did not get to any of the destinations. Note Segment did not write that okgrow repo, and it is not an officially supported method of using Analytics.js. It seems like the "okgrow" library you're using is not loading our library correctly and this could explain why no events are being triggered to GA. My recommendation here is 1) either reaching out to the developers that maintain this repo/library to ask how they are loading things and why they are not following our best practices or 2) loading our library directly in your site without using this 3rd party. We can't really speak to how things should work via "okgrow" but we can definitely debug and help out when things are loaded via our script. Does this make sense? Here are some docs on how you can add our library directly to your site: https://segment.com/docs/sources/website/analytics.js/#getting-started. It definitely seems to me like the okgrow repo you're using is causing issues because of its non-standard way of loading analytics.js.

I was wondering if anyone else had similar issues/can assist. Thanks!

cfnelson commented 6 years ago

@Macbit I would recommend testing out the base pkg which is here first https://github.com/okgrow/auto-analytics , if this one doesn't report the analytics correctly then I am at a loss as it works correctly for other Meteor projects which we have used this for in the past.