google-analytics

Issues with SegmentIO open source version setup of analytics.js

左心房为你撑大大i 提交于 2019-12-03 20:58:27
I am switching from SegmentIO to their open source version. I used this blog post as a guide but it's not tracking. Anyone see issue with this code: window.analytics || (window.analytics = []); window.analytics.methods = ['identify', 'track', 'trackLink', 'trackForm', 'trackClick', 'trackSubmit', 'page', 'pageview', 'ab', 'alias', 'ready', 'group', 'on', 'once', 'off']; window.analytics.factory = function (method) { return function () { var args = Array.prototype.slice.call(arguments); args.unshift(method); window.analytics.push(args); return window.analytics; }; }; for (var i = 0; i < window

jQuery being loaded into gtm.js from Google Tag Manager

强颜欢笑 提交于 2019-12-03 20:35:57
I've been having an issue where jQuery v1.9.1 is being included into the top of the gtm.js file. It causes a few issues and can blow away jQuery plugins that are already loaded on jQuery.fn. Regression testing is also a concern. I checked and I don't appear to have any custom tags in the Google Tag Manager that loads jQuery. Ultimately I want to have control over the host domain and version of jQuery loaded. Is there a configuration setting in the GTM interface or some other way that I can disable the inclusion of jQuery? I'm pretty sure that the jQuery code that is included in gtm.js is

Node: Google Analytics data via service account

半腔热情 提交于 2019-12-03 20:27:12
Update: I've since turned the code into an NPM module . I've worked my way through created a JWT token for a service account , and I can access user data, but I want to get to my analytics data to use it to drive content on my website. Note: I don't know if there is a better way than this, but the the existing npm tools seem to require that you enter your password. As a result I end up using REST calls rather the gapi tools. This is the error I get { error: { errors: [ [Object] ], code: 403, message: 'User does not have any Google Analytics account.' } } Here is the code I am using which is

How to track custom events when Google Analytics is managed by Google Tag Manager?

假如想象 提交于 2019-12-03 20:17:51
问题 I ended up having to use Google Tag Manager for my site, so Google Analytics is now a part of that. It's all set up correctly and working fine. However, I used to be able to track custom events on my site very easily, with the ga() function: ga('send', 'event', 'Videos', 'play', 'Fall Campaign'); However, now ga() is no longer defined; I get an error in the console, ReferenceError: ga is not defined . I then tried the gtag() method and it also doesn't work (same error message): gtag('event',

Google Analytics - Tracker Object from Activity

喜你入骨 提交于 2019-12-03 20:11:20
I am creating the Google Analytics Tracker object from an Activity. The issue is that I am getting an error in the cast operation done on this.getApplication(). Please let me know how to create a tracker object from an Activity. public void sengToGoogleAnalytics() { Tracker t = ((AnalyticsSampleApp) this.getApplication()).getTracker(TrackerName.APP_TRACKER); t.setScreenName(getString(R.string.memoryhome)); t.send(new HitBuilders.AppViewBuilder().build()); } Log 06-11 11:49:59.510: E/AndroidRuntime(2917): FATAL EXCEPTION: main06-11 11:49:59.510: E/AndroidRuntime(2917): java.lang

Google Analytics & iFrame

给你一囗甜甜゛ 提交于 2019-12-03 20:06:46
So I have a simple page and when a user clicks on a link an iframe opens. I am trying to use the http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55527 pageTracker._trackPageview('/outgoing/example.com'); Inside the iframe - but it seems that its not working ? I have read this page code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#trackingIFrames And it seems that I use the "iframe.src = pageTracker._getLinkerUrl" to pass some cookie info to the iframe - the problem is that I want to track stuff INSIDE the iframe (i.e. such as events etc) and I get a

Google Analytics missing __utmz cookie

眉间皱痕 提交于 2019-12-03 19:59:34
问题 I have universal analytics installed on my website, and want to parse the __utmz cookie to get referral info. However, I never see this cookie set. Has something changed? Any reason this isn't set? I do see the _ga cookie when I browse my site, and I see the __utmz cookie in my browser cache if I go to other sites. I checked out the docs, and don't see any reference to this changing recently, so a bit stumped. 回答1: Universal Analytics doesn't create any __utm* cookies. However, you can use

Google Analytics tracking in Chrome Extension's background.html

帅比萌擦擦* 提交于 2019-12-03 18:30:29
问题 When I realized that I cannot track directly in content script. I start to work with background HTML tracking my data. via Content Script tracking with Google Analytics When I set up my background script, I figured out that it doesn't support inline script. So I put the code in a js file and use "src=filename.js" to include that. via chrome extension insert content script on browser action But finally there is a trouble: I cannot load ga.js at all because it still violates the rule. Here is

Deploying Google Analytics With Django

有些话、适合烂在心里 提交于 2019-12-03 18:26:29
问题 We're about to deploy a new Django website, and we want to use Google Analytics to keep track of traffic on the site. However, we don't want all of the hits on development instances to contribute to the Google Analytics statistics. There are a few ways we could deal with this: have a configuration option in settings.py which the base template uses to decide whether or not to include the appropriate <script> elements, maintain a branch which we pull into before deploying to the production

Create a Google Analytics view filter that excludes hits with missing fields

冷暖自知 提交于 2019-12-03 18:11:27
问题 I have a mobile iOS app that uses Google Analytics. Recently I have been receiving hits in my reports that are clearly not coming from my app. I guess someone must be using my tracker ID (I hope, by mistake). So I've been trying to create a filtered view that doesn't include this traffic. My first approach was to create an include filter on the applicationID field, hoping that would filter out any hit that doesn't have the right applicationID. When using the Google Analytics iOS SDK, this