Mixpanel
Send subscriptions events to Mixpanel channel.
Glassfy monitors the subscriptions and sends all the relevant events to Mixpanal even if the user does not open the app.
- Copy the "Project Token" from Mixpanel Dashboard -> Project Settings -> Overview
- Open Mixpanel connector setting in the Glassfy dashboard and paste the "Project Token"
- If you are integrating the Mixpanel SDK in your app you can following this instruction to connect the events data with the user.
Event format
Glassfy will send to Mixpanel two records with the following format every time an event is generated
{
"event": 5001
"properties": {
"$insert_id": "R9YECBG3ZG9ACDMHZA4GWAIFB97BXZ0T",
"distinct_id": "appUserId",
"product_id": "ios_premium_weekly_1_99",
"revenue": 1.99,
"store": "App Store",
"subscriber_attributes": {},
"time": 1608726707766,
"token": "your_token"
}
}
[{
"$append": {
"$transactions": {
"$amount": 1.99,
"$time": 1610540237000,
"product_id": "ios_premium_weekly_1_99",
"store": "App Store"
}
},
"$distinct_id": "appUserId",
"$token": "your_token"
}, {
"$add": {
"Total Tracked Revenue": 1.99
},
"$distinct_id": "appUserId",
"$token": "your_token"
}]
Integrate with Mixpanel SDK
If you optionally integrate the Mixpanel SDK in your app please follow the instructions here{:target="_blank"} and add the following code.
Glassfy.initialize(apiKey: "YOUR_API_KEY", userId: "appUserId")
Mixpanel.mainInstance().identify(distinctId: "appUserId")
[Glassfy initializeWithAPIKey:@"YOU_API_KEY" userId:@"appUserId"];
[[Mixpanel sharedInstance] identify:@"appUserId"];
Updated 10 months ago