- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
12-10-2014 08:37 AM - last edited on 10-06-2015 11:38 AM by kathleen_jo
The mixpanel "track" function allows for additional data to be set in a second parameter: mixpanel.track(pagename, {"Key": "value"});
How can I add this second parameter to "track"?
Solved! Go to Solution.
10-06-2015 11:39 AM
10-06-2015 11:39 AM
Hi Jordi,
All you need to do is map your data source, and instead of selecting an option from the mapping toolbox, enter the name of the "Key" that you want to map to. In the example above, the result would be:
mixpanel.track(<event_name>, {"email" : "test@test.com"});
I hope this helps. Please note I've just used email as an example - any data source will work in exactly the same way.
Craig.
10-06-2015 11:43 AM
10-06-2015 11:44 AM
Hi Martijn,
The guide you are referring to is the HTTP specification, but we are using the JavaScript library. Having read through the spec, all the things described in the HTTP tracking guide are already supported by the Tealium JS template.
You can use the "set", "set_once" and "increment" mappings to call the relevant API functions. For example, to map "DOB" to the "people.set_once" API method, you would map data source "DOB" to the value "people.set_once.dob", and the resulting call to mixPanel would be something like:
mixpanel.people.set_once({"dob" : "01/01/1990"});
You can set as many of these properties as you wish.
I hope this helps. Merry Christmas :-)
Craig.
10-06-2015 11:45 AM
05-20-2019 10:56 AM
Craig, thanks for the details, though it seems .alias is missing, how is this done in Tealium? in Mixpanel you call mixpanel.alias("YOUR_USER_ID") so it should work how .identify does, but it doesn't have a mapping like identify does. @craig_rouse
05-21-2019 03:08 AM
@jmurano Although it doesn't have a mapping, if you manually map using the mapping name "alias", the tag template will automatically call the mixpanel.alias() method for you. I'll create an action internally to get the mapping options updated for the Mixpanel tag, as this really should be more obvious.
Copyright All Rights Reserved © 2008-2023