google-analytics

How to display Google Analytics' active visitors on site' number on my website?

狂风中的少年 提交于 2019-12-18 04:03:47
问题 Google Analytics' new version has Real Time (beta) , and it is able to show the number of active visitors on site . I am wondering how to display this number on my website. 回答1: Right now you can't do that through the Google Analytics API but there is a feature request in for it. Issue 154: Access to Real Time data Update: Google has added a real time api: https://developers.google.com/analytics/devguides/reporting/realtime/v3/ Announcement Update2: "The Google Analytics superProxy allows you

Android - Using Google Analytics v4 Campaign Measurement

左心房为你撑大大i 提交于 2019-12-18 01:15:30
问题 I have implemented Google Analytics Campaign Measurement according to this guide. Then I want to test if everything works good by following this guide. I have added these on AndroidManifest.xml : <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <meta-data android:name="com.google.android.gms.analytics.globalConfigResource" android:resource="@xml/global_tracker" /> <!-- Used for Google Play Store Campaign Measurement-->; <service

Is there a way track the focus on tab with Javascript?

爱⌒轻易说出口 提交于 2019-12-18 00:29:30
问题 We need to track the EFFECTIVE time on site of our users Most users, when they're done, leave the tab open and move to another tab Time on site it's extremely inaccurate Is there a Javascript Event to track the "loss of focus" of the current tab ? 回答1: This should work both on tab switch and on browser window losing focus: function onBlur() { document.body.className = 'blurred'; }; function onFocus(){ document.body.className = 'focused'; }; if (/*@cc_on!@*/false) { // check for Internet

Step by step to get Google Analytics working in PhoneGap 1.2.0 on iOS (phonegapalytics)

一个人想着一个人 提交于 2019-12-17 22:13:07
问题 How do I install Google Analytics in PhoneGap 1.2.0 in iOS? 回答1: First and foremost I have to give a lot of credit to the guys here. Their blog was of tremendous help but I still had to do a few more things to finally get it to work. I’m going to go through it step by step so that you can get it to work at a very basic level and then you can take it from there. I found that even the slightest mistake can mess things up. I am assuming you have installed PhoneGap 1.2.0 and are using Xcode 4.2

How does google analytics collect its data?

怎甘沉沦 提交于 2019-12-17 21:50:36
问题 Yes, I know you have to embed the google analytics javascript into your page. But how is the collected information submitted to the google analytics server? For example an AJAX request will not be possible because of the browsers security settings (cross domain scripting). Maybe someone had already a look at the confusing google javascript code? 回答1: When html page makes a request for a ga.js file the http protocol sends big amount of data, about IP, refer, browers, language, system. There is

How can I track downloads of files from remote websites

為{幸葍}努か 提交于 2019-12-17 21:23:28
问题 I am sharing the link of a file (e.g. pdf), which is stored in my server. Is it possible to track whenever some user is downloading the file? I don't have access to the script of the other page but I thought I could track the incoming requests to my server. Would that be computationally expensive? Any hints towards which direction to look? 回答1: You can use the measurement protocol, a language agnostic description of a http tracking request to the Google Analytics tracking server. The problem

GoogleAnalytics.getInstance(this) not respond

让人想犯罪 __ 提交于 2019-12-17 20:50:20
问题 I have an android applcation and I added Google Analytics Tracker to it and it works (I can see the views in the Analytics panel). The problem is that sometime the application starts to load and then gets stuck and not responds anymore. I tried to debug it and I found out that when it comes to the line GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); sometime there is no respond. Why is this happen and how can I fix it? EDIT: I added optional analytics_global_config and it still

Google Analytics and Content-Security-Policy header

和自甴很熟 提交于 2019-12-17 19:01:30
问题 The Content-Security-Policy HTTP header is meant to block inline script and resources from untrusted servers. However, the sample Google Analytics code snippet depends on both. What are the best practices in this area? This is the Content-Security-Policy header that I'm currently using: default-src 'self'; script-src 'self' https://ssl.google-analytics.com; img-src 'self' http://www.google-analytics.com/__utm.gif https://ssl.google-analytics.com/__utm.gif; So far, I've done the following: I

Google Analytics proxy

耗尽温柔 提交于 2019-12-17 17:52:07
问题 I have a special situation where the sites visitors can access the page from a certain domain but no others. So HTML and assets are no problem as long as they are stored on the server. Google Analytics on the other hand requires a download of analytics.js from Googles servers, which is impossible. So I'm looking for a way to proxy this. The webserver itself has internet access and could relay the trafic. To report to Google about my page view, a single pixel GIF is downloaded from Google,

Google Analytics iOS Campaign Tracking and URL Builder

雨燕双飞 提交于 2019-12-17 17:36:23
问题 We want to track installs with Google Analytics for our iOS app. What we already done: we have last iOS SDK 3.10 we enabled idfa collection like it says here Build with IDFA available in AppStore ("ready for sale" in itunes connect) we have a tracking link that was generated using iOS Campaign Tracking URL Builder Seems everything OK. But tracking link doesn't work. For user, that was redirected from this link, ga:campaign and ga:source are empty in GA database: And there is nothing in Google