amplitude / amplitude/Amplitude-TypeScript

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

未關閉
#896 4 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
bug sessionreplay
主要語言
TypeScript
星號
180
分支
68
平均合併
3 天 1 小時
30 天內合併 PR
29

描述

## Expected Behavior
The standalone SDK [docs for Segment](https://amplitude.com/docs/session-replay/session-replay-standalone-sdk#amplitude-actions-destination) 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:

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。