google-analytics

Google Analytics _trackEvent not working

假装没事ソ 提交于 2019-12-13 18:01:13
问题 I am trying to track each menu on the website using _trackEvent of Google analytic. So far Analytic is working fine but Event Tracking is not working. Below is the code i am using // Analytics (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,

GA total results is significantly less with hour dimension than with date dimension

血红的双手。 提交于 2019-12-13 18:01:08
问题 I am using the GA API running two queries over 1 year's worth of data: Query1: Get apiQuery = analytics.data().ga() .get("ga:" + profileId, "2013-03-08", "2014-03-09", "ga:visits") .setDimensions("ga:campaign,ga:keyword,ga:date") .setSort("ga:campaign,ga:keyword") .setFilters("ga:medium==cpc") .setMaxResults(1000); Query2: Get apiQuery = analytics.data().ga() .get("ga:" + profileId, "2013-03-08", "2014-03-09", "ga:visits") .setDimensions("ga:campaign,ga:keyword,ga:date,ga:hour") .setSort("ga

difference between ga:entranceBounceRate and ga:visitBounceRate

陌路散爱 提交于 2019-12-13 17:59:32
问题 What is the difference between ga:entranceBounceRate and ga:visitBounceRate ? I found the following definition from Google analytics like ga:visitBounceRate The percentage of single-page visits (i.e., visits in which the person left your site from the first page ). ga:entranceBounceRate The percentage of single-page visits (i.e. visits in which the person left your site from the entrance page ). The Only difference which i see is first page and entrance page. Is both not the same ? How it is

Google analytics, display more than 1 query

大憨熊 提交于 2019-12-13 17:42:27
问题 I'm pretty new to PHP so bear with me please :) Right so I am working with google analytics and I am using one of their scripts to display one query. It looks all good but I'm not really sure how to display more? I know to get a query, but I have trouble displaying it. I can only display 1. I only have sessions but I want to add more for example , bounce rate etc. Here is the code I am using: <?php require_once 'google-client/vendor/autoload.php'; session_start(); $client = new Google_Client(

Effect of creating an Exclude Filter without selecting a view(s)

喜欢而已 提交于 2019-12-13 17:31:22
问题 My client has setup a GAN account and an App Property for a mobile app we are developing for them. They desire to see the GAN hits in Real-time during testing, but then during production they want to exclude analytic traffic originating from their IP. Normally they move all their available "views" over to the "Selected Views" column when the app is in production, and their thought was, instead of deleting the filter all together in order to test the app from their IP, they'd just move all the

Python - how to authenticate consult Google Analytics from AWS Lambda?

那年仲夏 提交于 2019-12-13 17:19:55
问题 I have a python script to consult certain data from Google Analytics but im trying to go a little bit further and let Lambda (from amazon web services) do it automatically for me everyday. But i encounter a problem and im stuck with it. I don't know how can i authenticate OAuth 2.0 from the script without using a client_secrets.json file and if there is no other way to do it how and where i should leave the .json file in order to let it authenticate itself. As it explains here since im not

Showing Google Analytics Data in real time

穿精又带淫゛_ 提交于 2019-12-13 17:03:42
问题 I would like to show number of visitors on a site since beginning of the month, number of users on the current day and currently on site. I have Google Analytics installed, I tried to solve this issue with Embed API by enabling Google Analytics API from developer console - but I requires user authorization, etc. What would be the easiest way to show analytics on-site without user authentication and accepting access by Embeded API, etc. Application is written in Angular, so Javascript API is

Consecutive GA hits being dropped

给你一囗甜甜゛ 提交于 2019-12-13 12:10:29
问题 I want track offline event using Google Analytic and Local Storage. this is my code: var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-27966345-1']); _gaq.push(['_setDomainName', 'none']); _gaq.push(['_setSessionCookieTimeout',10]); _gaq.push(['_setSampleRate', '400']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '

Segment framework make UIAlertController to crash

北城以北 提交于 2019-12-13 10:18:49
问题 I follow "https://segment.com/" to implement analytics user usage on my iOS source. But when i use UIAlertController to show alert with title is @"", my app was crash! I don't know exactly why. To solve it, i must set title of alert is nil. And this is my logs: 2016-11-10 17:12:57.185 Lightning Rider Partner[24434:236155] *** Assertion failure in -[SEGAnalytics screen:properties:options:](), /Users/dungdo/Desktop/tcourier-ios/v2_driver/Pods/Analytics/Analytics/Classes/SEGAnalytics.m:323 2016

Cannot get Geolocation script to work

 ̄綄美尐妖づ 提交于 2019-12-13 09:46:41
问题 I scripted the following code, but for some reason it does not work please help thanks <script> $.getScript('http://www.geoplugin.net/javascript.gp', function() { $location = geoplugin_countryCode(); $location2 = geoplugin_continentCode(); if($location == "CA" || $location == "US" || $location2 == "EU" || $location2 == "DE" || $location2 == "FR" || $location2 == "GB") { alert($location); var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-9240923-27']); _gaq.push(['_trackPageview']);