react-native-google-analytics
react-native-google-analytics copied to clipboard
Documentation for setup
trafficstars
Hey guys, I haven't been able to successfully log anything to my GA app. I'm receiving this warning however
Received data was not a string, or was not a recognised encoding.
Any ideas? Its making the request successfully, but nothing is logged on GA backend.
I am facing this issue as well, any idea for a solution?
Thanks!
https://github.com/facebook/react-native/issues/1780
https://github.com/facebook/react-native/blob/master/Libraries/Network/RCTNetworking.m#L349
// If we still can't decode it, bail out
NSLog(@"responseText: %@", responseText);
NSLog(@"data: %@", data);
NSLog(@"response: %@", response);
NSString *strData = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"strData: %@", strData);
if (!responseText) {
RCTLogWarn(@"Received data was not a string, or was not a recognised encoding.");
return;
}
2016-06-28 16:25:03.077 airpopo[5072:101005] responseText: (null)
2016-06-28 16:25:03.078 airpopo[5072:101005] data: <47494638 39610100 010080ff 00ffffff 0000002c 00000000 01000100 00020244 01003b>
2016-06-28 16:25:03.078 airpopo[5072:101005] response: <NSHTTPURLResponse: 0x7c00e050> { URL: https://www.google-analytics.com/collect?an=AirPoPo%20Client&cd=route&av=0.5.0&aid=com.dingtaxi.airpopo&aiid=0.6.0.1&t=screenview&ul=en-US&vp=320x568&v=1&tid=UA-78509036-3&cid=928E2B63-35AD-4D75-AD42-C172CF80A1DB&&z=48523941 } { status code: 200, headers {
"Access-Control-Allow-Origin" = "*";
Age = 562381;
"Cache-Control" = "no-cache, no-store, must-revalidate";
"Content-Length" = 35;
"Content-Type" = "image/gif";
Date = "Tue, 21 Jun 2016 20:12:02 GMT";
Expires = "Mon, 01 Jan 1990 00:00:00 GMT";
"Last-Modified" = "Sun, 17 May 1998 03:00:00 GMT";
Pragma = "no-cache";
Server = Golfe2;
"alt-svc" = "quic=\":443\"; ma=2592000; v=\"34,33,32,31,30,29,28,27,26,25\"";
"alternate-protocol" = "443:quic";
"x-content-type-options" = nosniff;
} }
2016-06-28 16:25:03.078 airpopo[5072:101005] strData: (null)