docs icon indicating copy to clipboard operation
docs copied to clipboard

Adding dynamic project token from url param projectToken

Open santigracia opened this issue 11 months ago • 3 comments

  • found a way of not using Router and use the window.location searchParams

  • needed to use useEffect because of the new tab functionality, switching between tabs changes the DOM and we need to update proj token accordingly

  • based on current element structure, I couldn't find an alternative to querySelectorAll().find to select that DOM element.

  • Applied the code only to the needed SDKs sections: Javascript, Android, Swift, Obj-C according to onboarding guide here: https://mixpanel.com/report/project_id/view/view_id/setup/

santigracia avatar Mar 04 '24 14:03 santigracia