react-native-google-analytics
react-native-google-analytics copied to clipboard
RCTNetworkingQueue Error
Getting error about received data was not string or was not a recognised encoding?
My request:
var gaEvent = new GAHits.Event('test', 'test', 'test', 1); ga.send(gaEvent);
I also ran into this error. Same as #17
edit:
After some testing, I think this has to do with Google's Measurement Protocol Reference. I used one of my other tracking id for one of my websites and the event was tracked. However when I used my app's tracking id, no event was tracked.
Also the error message is being emitted via React's RCTNetworking.m 320:1. Since the response from the url (https://ssl.google-analytics.com/collect) is a gif, the message can be disregard as no response is actually needed after a request with the data payload has been sent.
I'm still working out why this API works with normal website tracking ids and not app tracking ids
Great detective work, @the4dpatrick. I was about to use Google Web Analytics as a fallback - good to know I can still use this package in that event. I'll look into the GA documentation as well and see if I can help.
This is also the same as #2, which is already closed. We should probably keep the conversation here.
https://github.com/facebook/react-native/issues/1780
No one has indicated what version of iOS they're running - looks like this should be fixed starting with iOS 8? If this is not the case then we should re-open this issue citing a regression.
I was on 9.1 iphone 4s
@the4dpatrick, I'm confused at to how you are getting it working with GA for web. I tried this as well as the normal mobile tracking and was not successful either way. Could you share a code snippet to show how you are using it? Thanks
@LukeAvery92, thanks, I'll reopen that issue.
@lwansbrough I'm running iOS 9.1 on a 5S. It's definitely not related to the iOS version. I've tried on both a physical device and the Simulator but can't get any visits to be recorded in GA.
@nicholasalanbrown It's interesting that the visits aren't being recorded. Are requests sent when you MITM your phone/computer? The issue that the bug report pertains to is explicitly the response causing problems. This is a problem with React Native core. Any other issues you see that don't result in this problem should be filed separately.
I've created a separate issue here #21 @lwansbrough @tgoldenberg