Google Analytics blocks Android App

i had similar i removed the below code and application runs.. <meta-data android:name=”com.google.android.gms.analytics.globalConfigResource” android:resource=”@xml/analytics_global_config” /> and add following code for getTracker class… build the GoogleAnalytics using java code rather than XML approch synchronized Tracker getTracker(TrackerName trackerId) { Log.d(TAG, “getTracker()”); if (!mTrackers.containsKey(trackerId)) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); // Global GA Settings // <!– Google Analytics SDK … Read more

What is the client ID when sending tracking data to google analytics via the measurement protocol?

Integer or UUID The cid is the equivalent of the second value in the _utma cookie when you use the javascript tracking. In js tracking, it is a random integer (generated by Math.round(2147483647 * Math.random())). But it is strored and sent as a string : so you can use both formats (integer or UUID). Required/Optional … Read more

307 Redirect when loading analytics.js in Chrome

307 Internal Redirect with Non-Authorative-Reason: Delegate indicates that the request was intercepted and modified (redirected) by a Chrome extension via the webRequest or declarative webRequest extension APIs. You can find out which extension triggered the redirect as follows: Visit chrome://net-internals/#events Trigger the request (google analytics, in your case). Go back to the chrome://net-internals/#events tab and … Read more

Google Analytics GIF request not sent

Are you testing your site on localhost or an intranet? If so, you may need to add _gaq.push([‘_setDomainName’, ‘none’]); before _trackPageview See Google Analytics on Intranets and Development Servers for more info… If you’re using Google Analytics on a site with a URL like http://intranet/ or something like http://mydevserver:12345 it won’t work. Specifically, the Google … Read more

Track campaigns with Google Analytics without query string parameters?

_set campaignParams Your theoretical “_setCampaignData” finally exists, in the form of [“_set”,”campaignParams”,…] If you have a way to programmatically inject the values you’d like to set (for example, set by a cookie on a redirect, or on the server side and printed onto the page), you can use the _set API to hard-code the campaign … Read more

Angular 4+ using Google Analytics

First of all, you need to install typings for Google Analytics in your devDependencies npm install –save-dev @types/google.analytics Then add your tracking code in the base index.html, and remove the last line as shown bellow: <body> <app-root>Loading…</app-root> <script> (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,’script’,’https://www.google-analytics.com/analytics.js’,’ga’); ga(‘create’, ‘UA-XXXXXX-ID’, ‘auto’); // <- add the UA-ID // <- remove the … Read more