Can I send data from one website to two different Mixpanel projects?

Sending Event data from a single website to multiple different Mixpanel projects is possible using the JavaScript library and modifying the mixpanel.init call.

The optional library_name parameter in the mixpanel.init function allows you to specify which library to write to in all tracking calls. For example, say you have project A with a token of "123abc" and project B with a token of "456def." After your initial Project A init call (with 123abc), you could set up a second instance of the initialization like this:

mixpanel.init("456def", {}, "project_b")

You would then send any project B calls like this:

mixpanel.project_b.track("Event name") 

Any standard track calls without a specified project name would go to the initial Mixpanel project.

Read additional documentation on mixpanel.library_name.

You also may be interested in how to initialize multiple versions of the Mixpanel library on the same app (Android or iOS).

Find your answer?
0 out of 0 found this helpful



Article is closed for comments.