oso icon indicating copy to clipboard operation
oso copied to clipboard

Check if we can identify users in the docs via Segment

Open ryscheng opened this issue 10 months ago • 5 comments

What is it?

Related https://github.com/opensource-observer/oso/issues/1133

ryscheng avatar Mar 26 '24 18:03 ryscheng

Seems like there might be a way to do it explicitly via cookies if Segment can't do it automatically

https://github.com/twilio-labs/docusaurus-plugin-segment

ryscheng avatar Mar 26 '24 19:03 ryscheng

Attempting an older plugin here https://github.com/opensource-observer/oso/pull/1171

ryscheng avatar Apr 03 '24 03:04 ryscheng

Fixed a bug in how the plugin is loaded here. Confirmed that it's sending data to Segment now https://github.com/opensource-observer/oso/pull/1173

ryscheng avatar Apr 03 '24 15:04 ryscheng

Fixed a bug in how Segment was being loaded and identifying users on the frontend-prod https://github.com/opensource-observer/oso/pull/1177

ryscheng avatar Apr 04 '24 13:04 ryscheng

Okay here's the summary so far:

  • I got Segment running on Docs and collecting analytics on anonymous IDs for now
  • I don't believe the linking from frontend <=> docs users is auto-magic like I hoped
  • We probably need to add a Supabase login in docs to get the user's ID
  • Then plumb it up to the analytics.identify. Relevant links: https://www.npmjs.com/package/@laxels/docusaurus-plugin-segment#how-to-use https://segment.com/docs/connections/spec/identify/

I think this is probably lower priority at least for now, I'm gonna move it back to backlog until we get some time. A perfect starter task for a new dev if we get one

ryscheng avatar Apr 04 '24 14:04 ryscheng