The issue centers around our landing page on <doma...
# questions
h
The issue centers around our landing page on domain.com and our main application hosted at another.domain.com It appears that users are not being accurately mapped, likely due to our web app being hosted under a subdomain. We suspect this may be related to local storage not being shared effectively. Our initial strategy was as follows: 1. Capture the distinct ID on the landing page. 2. Append this ID as a query parameter to the web app’s URL. 3. Extract the distinct ID from the URL on the web app. 4. Utilize the new distinct ID to identify the user accurately. Unfortunately, this approach doesn’t appear to be working as intended. -- The main problem that we are trying to solve: 1. The user googles the site 2. The user comes to our landing page (init mixpanel) 3. Clicks a button to login/signuo (we pass distictId via URL) 4. It opens a web app (init mixpanel with same token) 5. Enters login details 6. We call identify(user_id_from_db) The problem is that mixpanel maps users from the 2&3rd step, but the 1st step is missing! this way, we have no way to identify where the user came from. Any ideas on how to solve it?
f
First of all, apologies for replying to this thread 8 months later. When the user lands on domain 2, call mixpanel.register({ "distinct_id": URL_distinct_id}); From what you shared: 1. The user googles the site 2. The user comes to our landing page (init mixpanel) 3. Clicks a button to login/signuo (we pass distictId via URL) 4. It opens a web app (init mixpanel with same token) 5. Call mixpanel.register({ "distinct_id": URL_distinct_id}); 6. Enters login details 7. We call identify(user_id_from_db)
The register function updates the distinct_id value saved in the cookie/local storage