benjaminhoffman / gatsby-plugin-segment-js

Gatsby plugin for segment.com's analytic.js snippet
https://www.npmjs.com/package/gatsby-plugin-segment-js
MIT License
40 stars 28 forks source link

No automatic Identify User calls for anonymous visitors #20

Closed howardwkim closed 5 years ago

howardwkim commented 5 years ago

I am not seeing any identify calls in the Segment debugger for anonymous users. It's my understanding that anonymous users are tracked automatically (Note from Segment):

Note: You won’t need to call identify for anonymous visitors to your site. We’ll automatically assign them an anonymousId, so just calling page and track will still work just fine without identify.

Is anyone else experiencing this issue? Is this an issue with Gatsby/SSR and Segment?

Additional info:

benjaminhoffman commented 5 years ago

can you share a screenshot of the debugger that shows no identify but yes for track?

bigger question i have is, if everything is functioning as expected and working great, does it really matter that you aren't seeing identify calls? something could be happening under the hood w/ Segment that we don't know about.

howardwkim commented 5 years ago

None of my destinations (Google Analytics, FB, Heap) are receiving events from Segment. I wanted to eliminate the lack of identify calls as the culprit.

I'm seeing now that the raw data does include an anonymousId, so the identify call must be done under the hood. Time to search elsewhere... thanks!

Debugger screenshots below.

identify track