Tracking affiliate referral events and sending events and properties to multiple profiles using JavaScript SDK

  • 19 July 2020
  • 0 replies

  • New Participant
  • 1 reply

A little stumped, I hope someone can get me through.

We’re using Mixpanel for a basic affiliate tracking system and I’m trying to update the referrer (affiliate) profile at the time a successful signup is made using their code. I have configured it using GTM whereby I use mixpanel.identify(affiliate_id) of the affiliate ID and then revert back to mixpanel.identify(new_account_id), but no matter how the tags fire, the events are always going to the new_account_profile.

The difficult part for me to process is that it works if I run it through the console. I understand that mixpanel.identify(new_account_id) may have been run in a previous tag but I would have thought that by identifying again this would have cleared the previous identifications, am I mistaken? I have event tried mixpanel.reset() before the re-identification, to no avail also.


  mixpanel.track("Friend Joined", {"Friend (Public ID)": new_account_id,"Plan Name": "{{DLV - Membership Plan}}","Plan Type Name":"{{DLV - plan_type_name}}"});

If anyone has ideas on how I can solve for this, I’m all ears. TIA.

0 replies

Be the first to reply!