Skip to content

Commit 0b24029

Browse files
committed
Mixpanel doc
1 parent c9253e4 commit 0b24029

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/mixpanel.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
##Integrate adjust with Mixpanel SDK
2+
3+
The Mixpanel API allows to register common properties to be sent in all events as `super properties`, as it is explained in the [Mixpanel page][mixpanel_ios]. To integrate adjust with all tracked events of Mixpanel, you must set the `super properties` after receiving the response data of each event. Follow the steps of the [delegate callbacks][response_callbacks] chapter in our iOS SDK guide to implement it.
4+
The delegate function can be set as the following, to use the Mixpanel API:
5+
6+
```objc
7+
- (void)adjustFinishedTrackingWithResponse:(AIResponseData *)responseData {
8+
Mixpanel *mixpanel = [Mixpanel sharedInstance];
9+
10+
// The adjust properties properties will be sent
11+
// with all future track calls.
12+
if (responseData.network != nil)
13+
[mixpanel registerSuperProperties:@{@"[Adjust]Network": responseData.network}];
14+
if (responseData.campaign != nil)
15+
[mixpanel registerSuperProperties:@{@"[Adjust]Campaign": responseData.campaign}];
16+
if (responseData.adgroup != nil)
17+
[mixpanel registerSuperProperties:@{@"[Adjust]Adgroup": responseData.adgroup}];
18+
if (responseData.creative != nil)
19+
[mixpanel registerSuperProperties:@{@"[Adjust]Creative": responseData.creative}];
20+
}
21+
```
22+
23+
[mixpanel_ios]: https://mixpanel.com/help/reference/ios#super-properties
24+
[response_callbacks]: https://github.com/adjust/ios_sdk#9-receive-delegate-callbacks

0 commit comments

Comments
 (0)