Problem dispatching with google mobile analytics for iphone

前端 未结 2 1287
灰色年华
灰色年华 2021-01-14 09:36

I have integrated Google mobile analytics into my iphone app, but for some reason the page views and events are not dispatching.

I put this into my app delegate appl

相关标签:
2条回答
  • 2021-01-14 09:38

    It turns out all you have to do is delete the application and reinstall. Once you log one incorrect page view (ie one without a "/" at the beginning) nothing will upload to google analytics

    0 讨论(0)
  • 2021-01-14 10:04

    The Google Analytics stop sending data when you try to send a non formatted "URL", if it is not initiated with the "/" or contain some specific chars, it will start only returning errors.

    The best thing to do is, verify that you are placing the "/" on the beginning of you URL and before sending, format your URL to avoid any problem, by doing:

    
    NSString* pageURLString = [pageURL stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
    

    Encoding it with NSASCIIStringEncoding, will format the URL properly. The same can be used when tracking an event.

    0 讨论(0)
提交回复
热议问题