Mixpanel Distinct IDs

I am passing Mixpanel page view hits via Stape Server Container. When I enable this option - Automatically handle customer distinct_id.

I see that with every page load, it assigns a new distinct ID, shouldn’t the distinct ID be persistent throughout the session and device?

For example:

You will see with every page load, the distinct ID is different


When I disable the option, then it assigns a unique ID which is persistent. Why does this happens, or should I just keep it disable. When we should use this option?

3- Thirdly, what is the Distinct ID field box used for when the distinct id is already being captured.

Hi @Arif_Ahmed ,

Do you use your subdomain for sGTM which is the same as your top-level domain?

Thanks @Alex.

I am using Stape hosted transport URL, not using any custom domain mapping yet. I also realized Stape does not have init command in their tag template. Does this means that we have to pass the init library on the client side subsequently retreive the distinct ID on the client side and pass it the server through ga4 config tag? Or Stape handles this automatically. Not sure how automatic distinct ID will work, since it is assigning new id on every page load.

The Distrinct ID is generated and stored in the user’s cookies. Because you are using sGTM on a third-party domain, the cookie cannot be set, so you have a different ID for each event.

You don’t need to do init on client, all events can fully work server side.

Ok so If I configure the mapping, it should solve the problem. Correct?

Hi Alex,

I switched the domain from stape url to custom domain, and enabled automatic distinct ids, i see the distinct id changes in mixpanel with every page load.

Here is my tag configuration:

Tag

Trigger

This has been resolved. I will open a ticket for another issue that i spotted. Thanks for your help.