Closed mic-css closed 5 years ago
can you copy/paste the component you are trying to invoke the track method in? I just created a super simple example repo where you can see how I am doing it: https://github.com/benjaminhoffman/gatsby-plugin-segment-js/blob/master/example/src/pages/index.js#L12
In addition to sharing the code / component of where you invoke Segment, can you also help answer whether that area of the code is getting it. If it is, check your Network tab of your browser dev tools... do you see a Segment track call being made? If so, is it returning a 200 status code? If so, then you're sure the event isn't making it through?
Also, be sure to upgrade to the latest version of this package... I just bumped the Segment version to 4.1.0
! 🌮
@benjaminhoffman thanks for the reply and example.
I'm not explicitly firing any tracking events - the old library automatically registered page views with Segment. Has this behaviour changes in the new one?
Apologies, I hadn't realised that trackPage
defaults to false! Thanks for the help anyway.
Hi, I'm not receiving any tracking events.
I have no problem tracking with the deprecated package (
gatsby-plugin-segment
) but after uninstalling it and installing this package no tracking events come through.Any help would be much appreciated.
gatsby-config.js
below:Working correctly with deprecated library, for reference: