question

Kevin W Palmer avatar image
Kevin W Palmer asked

Google Analytics with Fire TV

When I use the web app tester to load and test the app, I cannot view any live google analytics events being sent to my account as I am watching in real time. I am using google standard script being placed in the head. Is this a known issue or a bug, or a web app tester thing?
fire tv
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ross@Amazon avatar image
Ross@Amazon answered
If you are trying to enable Google Analytics in your Android app, you should be following the steps recommended for Android ( https://developers.google.com/analytics/devguides/collection/android/v4/) but based on the script you included it looks like you're trying something which is recommended for web ( https://developers.google.com/analytics/devguides/collection/analyticsjs/). Is using the Android SDK a possible solution for you?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kevin W Palmer avatar image
Kevin W Palmer answered
For a web app I discovered you must create a custom string to post: this.gaUrl = " http://www.google-analytics.com/collect?"; this.gaUrl += "v=1"; // Version. this.gaUrl += "&tid="+ this.gaClientID; // Tracking ID / Property ID. this.gaUrl += "&cid=555"; // Anonymous Client ID. this.gaUrl += "&t=event"; // Event hit type this.gaUrl += "&ec=Channel%20Launch"; // Event Category. Required. this.gaUrl += "&ea=App%20Launched"; // Event Action. Required. this.gaUrl += "&el=App%20Name%20FireTV"; // Event label. this.gaUrl += "&z=" + Date.now(); this.data.postData(this.gaUrl); Post with basic ajax. For some reason the regular web api doesnt work as it would on the web.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.