I have an iOS SDK project with lots of modules (in Objective-C). I want to start tracking events to see how my clients use our SDK but I can't see anything in the insights tab. What am I doing wrong?
In the point of entry to the SDK I have added this (just following the docs):
[Mixpanel sharedInstanceWithToken:@"myTOKEN"];
self.mixpanel.serverURL = @"https://api-eu.mixpanel.com";
[self.mixpanel track:@"Video play" properties:@{
@"genre": @"hip-hop",
@"duration in seconds": @42,
}];
I can see with breakpoints that the code it’s executed, however my insights are completely empty.
I also tried adding events with the codeless tracking, and while it looks like it’s working and I can connect to the app, the events aren’t appearing in the insights tab.
I think you need to assign the shared instance to your local property if that hasn't been done outside of the code you've posted.
[Mixpanel sharedInstanceWithToken:@"myTOKEN"];
self.mixpanel = [Mixpanel sharedInstance]; // assign here
self.mixpanel.serverURL = @"https://api-eu.mixpanel.com";
[self.mixpanel track:@"Video play" properties:@{
@"genre": @"hip-hop",
@"duration in seconds": @42,
}];