简体   繁体   中英

Mixpanel integrated in iOS SDK is not sending events

​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,
    }];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM