-
Notifications
You must be signed in to change notification settings - Fork 313
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
Pass custom device_id
to library initialization
#422
Comments
|
@doc-han hey thanks for the answer! |
A uuid generated by you is supposed to used alongside the Identify literarily tells mixpanel that the |
Also would be great that I coud pass device_id for my mixpanel implementation on figma plugin. |
Same here. In my setup, This is ugly but it works (after initial load or if you do the page event manually): // with cookie_name: '__mp_data' in mixpanel.init opts.
const mpData = cookies.mp___mp_data
if (mpData) {
const mpDataJson = JSON.parse(decodeURIComponent(mpData))
mpDataJson.$device_id = cookies.__did
mixpanel.register({
$device_id: cookies.__did,
})
mpCookie.set('mp___mp_data', JSON.stringify(mpDataJson), {
expires: new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * 365),
domain: '.domain.com',
})
} Note: The |
Context about why we need this change:
The problem is that I need this device_id to be attached to mixpanel cookie but not with an mixpanel.identify() but as device_id, I think the best solution will be to you allow us to pass device_id in the project initialization so we can control the format of the device_id based on what we need.
The text was updated successfully, but these errors were encountered: