Hi @jbalandranocoro
I just realized that you may have been asking how to trigger events within the MixPanel Tag within TiQ:
In your example, you want to send an event like:
mixpanel.track('eventName', { ...eventProperties })
This can be achieved through Data Mappings. For example, if you wanted to track when a user adds something to their cart and also pass the product_id here are the steps:
Let's say when a customer clicks add to cart on the site, an event listener triggers a utag.link event and passes this object:
{ tealium_event : "cart_add", product_id : ["123456"] }
Knowing this, within Tealium we can configure the MixPanel to send that event like so:
1. Open the Data Mappings within MixPanel and choose the variable tealium_event and within the mappings:
Select Events in the Category Column
set the trigger, in this case, we want to trigger a track event whenever tealium_event equals cart_add
2. Next, we can pass an event name, within this example, we can use cart_add , since that is also the name of our event.
Select tealium_event from the dropdown
within the mappings section, go to Event in the left column
In the first drop down we want to choose which event tealium_event will be associated with, in this case Track
In the second dropdown, we can choose where tealium_event is assigned within that event, in this case, Event Name
3. Lastly, we will want to configure product_id to be sent whenever the cart_add event occurs.
Select product_id from the dropdown
within the mappings section, go to Event Parameters in the left column
In the first drop down we want to choose which event tealium_event will be associated with, in this case Track
In the second dropdown, we can choose where cart_add is assigned within that event, in this case, Event Name
After we complete the data mappings and publish. When a user clicks on an Add to Cart Button, the tag will fire and pass this event:
mixpanel.track('cart_add', { product_id : "12345" })
If you want to look at the Tag Template, it may help you get a better idea of how the code is being processed, for example here is the mixpanel.track function at work:
To view the tag template, it is within the Advanced Settings of the Tag Configurations.
https://community.tealiumiq.com/t5/iQ-Tag-Management/Managing-Tag-Templates/ta-p/21713
Good luck and let me know if that helps.
... View more