-
Notifications
You must be signed in to change notification settings - Fork 133
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
About the behavior that amp_device_id is not set when deviceIdFromUrlParam is true #302
Comments
Hi @aoshika-lv, I believe you are correct on all accounts - if the device Id is not available in the params via Thanks for flagging this! |
Hi @kelvin-lu. Thank you for your quick reply! |
…s not available in the params via amp_device_id. amplitude#302
…s not available in the params via amp_device_id. amplitude#302
…s not available in the params via amp_device_id. amplitude#302
* Make it fall back to other options/a base64Id, if the device Id is not available in the params via amp_device_id. #302
🎉 This issue has been resolved in version 7.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
About the behavior that amp_device_id is not set when deviceIdFromUrlParam is true
I'm using amplitude-js 7.1.1.
I'd like to get some feedback on whether this behavior is a bug or not(or is there an another solution I want to do)
As we are trying to connect anonymous users by device ID only on the two sites, I set the deviceIdFromUrlParam to true and send the amp_device_id to a specific hostname as shown below. But initially, amp_device_is is not set, then the device_id becomes null.
I understood "deviceIdFromUrlParam is true" to mean that I must first set amp_device_is to the URL, is that correct?
If the amp_device_id is not set, I think a better solution is to create a base64Id.
For example, if 'this._getDeviceIdFromUrlParam(this._getUrlParams())' returns null, you can use base64Id instead.
Amplitude-JavaScript/src/amplitude-client.js
Line 286 in bec6e50
If you need to create a new pull request, please let us know.
The text was updated successfully, but these errors were encountered: