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

Adding dynamic project token from url param projectToken #906

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

santigracia
Copy link
Contributor

  • 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 santigracia requested a review from a team as a code owner March 4, 2024 14:58
@santigracia santigracia requested review from saminmadani and removed request for a team March 4, 2024 14:58
Copy link

vercel bot commented Mar 4, 2024

@santigracia is attempting to deploy a commit to the Mixpanel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Mar 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2024 0:09am

Copy link
Collaborator

@tiffanyqi tiffanyqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd ideally like to see this in the components folder so that we can easily add and choose the specific string we want to replace so that we can move it elsewhere, but for now, this works for me. thank you!

@myronkaifung
Copy link
Collaborator

Hi @santigracia , looks like the changes here were approved. Our team will be merging changes for smaller PRs moving forward. However, due to time elapsed, could you update the branch then merge the changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants