Rails
To benefit from Mixpanel integration, you need to add thegem 'mixpanel_client' to your Gemfile.
Then, add the following code to your initializer. In our example we will map the Customer.email with the data coming from Mixpanel. You may replace by your own relevant collection(s).
By default, Mixpanel is sending the following fields: id, event, date, city, region, country, timezone, os, osVersion, browser, browserVersion. If you want to add other fields from Mixpanel, you have to add them in customProperties:
Customer in our example.
.png?fit=max&auto=format&n=UDnqA5TqR2qMKTU8&q=85&s=48e427ba1deac393ac09a9e5bd5edbf0)
You’ll need to install the Mixpanel Data Export package to run the Mixpanel integration