google-analytics

OnClick for google analytics and target _blank. The link does not work?

穿精又带淫゛_ 提交于 2019-12-09 00:16:22
问题 <a href="http://example.com/test.html" onclick="_gaq.push(['_link', 'http://example.com/test.html']);" class="noFloat" target="_blank"> Click Me </a> I have a problem with this code. Without return false; i have a new window and it's ok, but the same url is also open in the same parent window. Then i have two windows with the same content. I think the problem is the redirect of the _gaq.push Please help me! Thank you! 回答1: _link will replace your current page with the link page. So you should

How to set up page speed logging for google analytics in analytics.js

这一生的挚爱 提交于 2019-12-08 23:39:33
问题 Google released the new Analytics.js (https://developers.google.com/analytics/devguides/collection/analyticsjs/). I would like to use it, and I already have everyting set up just fine, apart from site speed. In the "old" ga.js you could do this with _gaq.push(['_setSiteSpeedSampleRate', 50]); This would set it so 50% of the visitors would report sitespeed to analytics. However, for the new analytics.js I cannot get it to work. I tried the following 2: ga('send','setSiteSpeedSampleRate',50);

How to extend google analytics to track AJAX etc (as per H5BP docs)

无人久伴 提交于 2019-12-08 23:13:34
问题 I am trying to install the google analytics augments identified in the extend.md file of H5BP (https://github.com/h5bp/html5-boilerplate/blob/v4.3.0/doc/extend.md) It states that the "optimised" google analytics JS snippet includes the following code: var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']]; and that additional augments such as track jquery AJAX requests , track javascript errors and track page scroll should be added after _gaq is defined. In fact, the snippet included

400 (Bad Request) when requesting GA API

吃可爱长大的小学妹 提交于 2019-12-08 22:34:24
问题 I got a 400 Bad Request when trying to access Google Auth. I am using the demo code in this article: https://developers.google.com/analytics/solutions/articles/hello-analytics-api The address I am requesting is: https://accounts.google.com/o/oauth2/auth?client_id=875938******.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.readonly&immediate=true&include_granted_scopes=true&proxy=oauth2relay452650337&redirect_uri=postmessage&origin=http%3A%2F%2Flocalhost

Memory Leak when Google Analytics sends a hit

一笑奈何 提交于 2019-12-08 21:08:32
I'm trying to use Google Analytics SDK v3.10 for iOS. I added all dependencies and headers, then in my app delegate, method : - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions , I added those lines : [[GAI sharedInstance] setDispatchInterval:20.0]; [[GAI sharedInstance] trackerWithTrackingId:@"UA-XXXXXXXX-X"]; [[GAI sharedInstance].logger setLogLevel:kGAILogLevelVerbose]; with the proper tracking id. In my landing view, method viewDidAppear, I added the lines id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker]; [tracker set

android analytics v4 most simplified

你离开我真会死。 提交于 2019-12-08 19:16:56
问题 I'm trying to connect google Analytics to my apps in the simplest way possible. I want to implement analytics v4, because google said that they'll force to upgrade to it soon, so I don't want to do twice the same work. Google's tutorial, in this case, is not very efficient. Merging what they said there and what I've found on the internet, I've made this steps: In Android Manifest, I've add this permissions: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission

libAdIdAccess.a location?

梦想的初衷 提交于 2019-12-08 16:38:12
问题 Following the instructions to use IDFA with Google Analytics on iOS (https://developers.google.com/analytics/devguides/collection/ios/v3/optional-features), I must link libAdIdAccess.a to my app. I'm using CocoaPods with the latest Analytics SDK and I can't find this file in the Pods folder. After some research, I downloaded the SDK directly from Google and there it is. Is there a way to get this file from CocoaPods? 回答1: You should install another pod called GoogleIDFASupport using CocoaPods

Google Analytics filter not working

流过昼夜 提交于 2019-12-08 16:12:33
问题 I send all my events to the same Google Analytics account and use profiles with filters to filter them out. My staging filter isn't working properly . Here it is, pretty simple: Here are my events, in the All Traffic profile (no filters): Based on my filter, the events with the hostname stagingsecure.example.com should show up in the Staging profile. But they don't. Any ideas why these events don't show up in my Staging profile? 回答1: I had the same problem. It turns out that GA Filters only

Missing data on Android enhanced e-commerce analytics page

◇◆丶佛笑我妖孽 提交于 2019-12-08 15:44:37
问题 I'm measuring my Android app checkout performance by using the google-analytics SDK. I created a Wrapper that I use in order to send hits (and it works) and exceptions (it works as well). I just can't make it work with eCommerce data. In order to send ecommerce data i create a product and a productAction Product product = new Product() .setId(ID) .setCategory(category) .setBrand(brandID) .setCustomDimension(1, typology) .setCustomDimension(2, currency) .setPrice(getTotal()) .setQuantity(1); /

Does preloading content from a page skew my google analytics stats?

本小妞迷上赌 提交于 2019-12-08 14:10:39
问题 I'd like to write myself a simple script that uses AJAX to load the content from each page on my main navbar into a hidden div on the current page. This is just so that I can preload as much of my important content as possible and get it cached on the user's computer (hopefully) before they've finished with the current page and want to move on. I'm concerned that doing a request for every page on the site, every time someone visits, will really ruin the validity of my google analytics stats.