google-analytics

Is there any way for Google Analytics to track multiple event parameters like Mixpanel?

帅比萌擦擦* 提交于 2019-12-30 03:11:45
问题 Given: _trackEvent(category, action, opt_label, opt_value, opt_noninteraction) I tried with opt_label but it seems like it's just a string and doesn't accept a hash of different parameters like Mixpanel do. I suspect one of the the work around is using custom variables? But the docs seems confusing. Appreciate any advice. 回答1: While you can certainly make this work in Google Analytics, other analytics services like Mixpanel, KISSmetrics, Kontagent, etc specialize in event analysis and give

google analytics doesn't show the active user in Real time overview

☆樱花仙子☆ 提交于 2019-12-30 02:48:26
问题 i have setup every thing in my app for using google analytics V4 and i get every things working and i can see it but when i go to real time overview in my mobile view i didn't see any active user this is my tracker <?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="TypographyDashes"> <integer name="ga_sessionTimeout">300</integer> <!-- Enable automatic Activity measurement --> <bool name="ga_autoActivityTracking">true</bool> <!-- The

Why are my iOS app's session lengths 30 min + in Google Analytics?

给你一囗甜甜゛ 提交于 2019-12-30 01:19:06
问题 More importantly, how do I fix it? It's as if backgrounding the app doesn't end the session. 回答1: When your app goes into background mode it needs to tell the analytics to stop tracking. Application Delegate would have something like: -(void) applicationDidEnterBackground:(UIApplication*)application { [[GANTracker sharedTracker] stopTracker]; } In google's Easy Tracker example, a view controller receives notifications when app state changes. Tracking is stopped when app goes into background

Client is unauthorized to retrieve access tokens using this method

喜欢而已 提交于 2019-12-29 08:18:29
问题 I have a custom dashboard in Ruby on Rails project with data collected from Google Analytics. I user Google Analytics Reporting V4 API and a Service Account to authenticate. My code works well if I don't impersonate user authorization.sub = 'xxx@mail.com' and If I do it, I get unauthorized_client error but not all the times. Sometimes it works, and sometimes not. This is my code: scope = [Google::Apis::AnalyticsreportingV4::AUTH_ANALYTICS_READONLY] view_id = 'xxxxxx' ENV['GOOGLE_APPLICATION

What is the advantage of using unescape on document.write to load javascript?

非 Y 不嫁゛ 提交于 2019-12-29 06:15:30
问题 The code that you have to add to track a web page with google analytics looks like: <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-XXXXX"); pageTracker._trackPageview(); } catch(err) {}</script> What's the

What is the advantage of using unescape on document.write to load javascript?

大兔子大兔子 提交于 2019-12-29 06:15:13
问题 The code that you have to add to track a web page with google analytics looks like: <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-XXXXX"); pageTracker._trackPageview(); } catch(err) {}</script> What's the

Google Analytics in iOS (Not Working)

北慕城南 提交于 2019-12-29 04:15:10
问题 I am trying to implement google analytics.. could you guys please help me -(void) setGoogleAnalytics{ // Initialize tracker. self.tracker = [[GAI sharedInstance] trackerWithName:@"ipad app" trackingId:kTrackingID]; NSDictionary *appDefaults = @{kAllowTracking: @(YES)}; [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; // User must be able to opt out of tracking [GAI sharedInstance].optOut = ![[NSUserDefaults standardUserDefaults] boolForKey:kAllowTracking]; // Optional:

javascript - Detect if Google Analytics is loaded yet?

牧云@^-^@ 提交于 2019-12-28 11:59:14
问题 I'm working on a project here that will store some info in Google Analytics custom variables. The script I'm building out needs to detect if GA has loaded yet before I can push data to it. The project is being designed to work across any kind of site that uses GA. The problem is reliably detecting if GA has finished loading or not and is available. A couple of variabilities here: There's multiple methods of loading GA. Older scripts from the Urchin days up to the latest asynchronous scripts.

what are the values in _ga cookie?

时光总嘲笑我的痴心妄想 提交于 2019-12-28 07:39:04
问题 I am using universal analytics. universal analytics creates first party cookie _ga _ga=1.2.286403989.1366364567; 286403989 is clientId 1366364567 is timestamp what is 1 and 2 in _ga cookie? 回答1: _ga=1.2.286403989.1366364567; 1st Field This is a versioning number. In case the cookie format changes in the future. Seems to be fixed at 1 at the moment. The one above is an old format. Newer cookies have this value set at "GA1" 2nd Field This field is used to figure out the correct cookie in case

Google Analytics API - Get page view information for specific URLs

左心房为你撑大大i 提交于 2019-12-28 03:18:09
问题 I am looking to implement a page view tracking system on one of my websites. The website is a directory where suppliers can advertise their services. Suppliers have a unique profile page on the site, e.g mysite.com/directory/abc-profile.html The idea is that suppliers can log in to their account area on the site and view stats on how many people are visiting their profile. Ideally I want to display this as : Total views | Total today | This week | This month | This year It does not matter if