Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment Actions docs: payload.obj.integrations['Actions Amplitude'].session_id is undefined in middleware #896

Open
GxDesign opened this issue Oct 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@GxDesign
Copy link

GxDesign commented Oct 8, 2024

Expected Behavior

The standalone SDK docs for Segment with Actions uses payload.obj.integrations['Actions Amplitude'].session_id for determining nextSessionId. This should be populated when the middleware runs.

Current Behavior

When I log this value, its always undefined. When I log integrations, it gets populated after the middwares run, suggesting it gets applied later in the middleware queue. I've had to use Cookie.get('analytics_session_id') instead.

Possible Solution

If this should be populated, please confirm with the steps below, logging that complete path. We may need a way to ensure the order of any internal middleware accounts for this or provide different instructions.

Steps to Reproduce

  1. Follow the docs, using a buffered instance. We call a function, segmentInit to call load on the instance. And then we apply the middleware. We also use a cdnUrl. (Use typescript, we get a lot of type errors following that documentation)
  2. Log payload.obj.integrations['Actions Amplitude'].session_id from the middleware.

Environment

  • JS SDK Version:
  • Installation Method:
  • Browser and Version:
@GxDesign GxDesign added the bug Something isn't working label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant