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

PostHog can't re-init after reset #1388

Open
joebnb opened this issue Aug 27, 2024 · 0 comments
Open

PostHog can't re-init after reset #1388

joebnb opened this issue Aug 27, 2024 · 0 comments

Comments

@joebnb
Copy link

joebnb commented Aug 27, 2024

i want isolate user data and staff data in one application.

this plan designed create 2 project to save different user‘s log, one is for anonymous user and logged in user,other is for staff.

the process like:

posthog.init(API_KEY_GLOBAL) 

login.request().then(()=>{

    if(isStaff){
        posthog.reset().then(()=>{
    
            posthog.init(API_KEY_STAFF)
            console.log(posthog) // fig1

        })
    }

});

the fig1 still log API_KEY_GLOBAL instance, i think it should be use API_KEY_STAFF to report log data

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

No branches or pull requests

1 participant