FAQ Database Discussion Community


GTM Google analytics dataLayer get wrong values

google-analytics,tags,manager
I defined a dataLayer to store some informations for pages, its looklike: dataLayer = { pageType: "Page type", mainCategory: "Main category of page", subCategory1 "Sub category level1", ... } Then I define custom dimensions: custom_dimension1: mainCategory custom_dimension2: subCategory1 .. With Scope is Session. I use Google Tag Manager to debug...

GAPI is Shutting Down Need A Lightweight PHP API for Google Analytics

google-analytics,google-analytics-api,gapi
This is the question for GAPI users which shut down yesterday: https://code.google.com/p/gapi-google-analytics-php-interface GAPI - Google Analytics API PHP Interface was a simple yet powerfull Google Analytics library. It was using the old API and required full Google username and password which was really old fashioned but it was working like...

View Google Analytics event value

android,google-analytics
I'm using GA to track events for an Android App. I track an event the usual way: t.send(new HitBuilders.EventBuilder() .setCategory(getString(categoryId)) .setAction(getString(actionId)) .setLabel(getString(labelId)) .setValue(longValue) .build()); I can see the event in my reports but I can only see the total amount the event has occured. How can I see a brakedown...

Google Analytics dash or not to dash

android,google-analytics
This is a follow up question to these question: encode the dash or not Google Analytics SDK in your app I still don't get if I should use the dash in the configuration file or not. The answers to both questions seems conflicting to me as in the analytics guide...

Get views for 3000 posts using GA API?

google-analytics
I want to use the Google Analytics API to pull the impressions for each page path, while ignoring query parameters. Is this possible? I've looked around the API for some time but it is so complex I'm needing a bit of guidance. For example: { path: '/post-one/', pageviews: 500 },...

Install multiple Pods in swift

swift,google-analytics,xcode6,cocoapods
I currently have the Google Places Pod in my Xcode workspace. I would also like to use Google analytics. Should I just add pod 'Google/Analytics', '~> 1.0.0' to my Podfile and run pod install again the same as I did the first time? Thanks...

Distinguish between adwords, organic visits, facebook organic and facebook ads in my admin system

php,facebook,google-analytics,google-adwords,facebook-ads-api
I'm trying to track leads from adwords, google organic visits, facebook organic and facebook ads in my admin system for reporting purposes. Adwords shows me the conversions/leads and analytics shows me the google organic goals/leads, but I'm also capturing all leads into a web admin system automatically when an enquiry...

GAPI: Failed to authenticate user. Permanent fix PHP [closed]

php,google-analytics,gapi
I am trying to fetch content from the GAPI it works sometimes but the other times it throws this error: Exception GAPI: Failed to authenticate user. Error: "https://developers.google.com/accounts/docs/AuthForInstalledApps " I browsed through all the answers but couldn't find a solution. I tried using both of these links previously: https://accounts.google.com/DisplayUnlockCaptcha https://www.google.com/settings/security/lesssecureapps...

How to specify what “list” the product was added to cart from? Enhanced Ecommerce

javascript,google-analytics,e-commerce,implementation,product
Trying to implement Google Analytics Enhanced Ecommerce tracking for my website. How to specify what "list" the product was added to cart from? Here is the standard tracking code for adding the product to basket: // Called when a product is added to a shopping cart. function addToCart(product) { ga('ec:addProduct',...

Is it possible to track subfolders using Google Analytics from one file?

javascript,php,google-analytics
Let's say this is my directory structure: ROOT index.php -- Folder 1 -> file.php -- Folder 2 -> file.php |-- subfolder -> file.php -= Folder 3 -> file.php and I need to put my tracking code on my index.php file, but I need this single code to track the activity...

Google Tag fires but not logged in Analytics

google-analytics,google-tag-manager
I had set up my Google Tag to track clicks on spans with certain IDs, the events are firing according to WASP extension, but they are not showing up in my Google Analytics account. Here is my trigger: My Tag: WASP in action: GA displays pageview only: Code is installed...

Google Analytics API Multiple Queries - Second Function?

google-analytics
This is a rather newbie question, please bear with me... I have successfully authorised my Google Analytics API account and am making the following call, which successfully prints the bounce rate. I want to add more queries on for things such as pageviews and sessions, how do i do this?...

BigQuery error: Cannot query the cross product of repeated fields

google-analytics,google-bigquery
I am running the following query on Google BigQuery web interface, for data provided by Google Analytics: SELECT * FROM [dataset.table] WHERE   hits.page.pagePath CONTAINS "my-fun-path" I would like to save the results into a new table, however I am obtaining the following error message when using Flatten Results = False:...

Apache RewriteCond to prevent infinite loop

php,apache,.htaccess,mod-rewrite,google-analytics
I'm using Google Analytics for my website, it's working fine with pages, the problem is the mp3 files that I want to hit the counter when they are accessed directly. I have a php file as follows: <?php error_log("hiiiiiiiii--".$_SERVER['REQUEST_URI']); // for testing error_log("meeeeeeeee--".$_SERVER["HTTP_REFERER"]); // for testing //header("location:".$_SERVER['REQUEST_URI']); ?> <html> <body>...

Google Analytics Event Tracking: button listener does not work

javascript,google-analytics
I need to add an event handler for GA event tracking to a button. I read the documentation thoroughly and spent an hour googling, but I didn't make it work. The session tracking works (I see myself in realtime analytics), but the event tracking doesn't work. This is my code:...

Why do I see results on my Google Analytics portal even before I run my app?

android,google-analytics
I got a new Google Analytics ID for my Android app (a game) in development (unreleased) around a week ago. Only today, I integrated Google Analytics SDK into my game, tested it and made it send events. For the first time, I opened my Google Analytics portal for my game...

How to track AJAX site search using Google Analytics?

javascript,jquery,ajax,google-analytics
I'm using AJAX (POST method) for my site search. Here's my AJAX call: $.ajax({ url: 'ajax.php', type: 'POST', dataType: 'json', data: { search_phrase: search_phrase }, success: function(data) { ... My aim is to use Google Analytics to start tracking search terms. Any idea how this can be done?...

Connecting to the Google Analytics API

php,api,google-analytics
I am trying to connect to the Google Analytics api. My ultimate goal is to add a goal automatically, but I cannot even HelloAnalytics to work. I have followed the explicit tutorial here. My require once did not work at first because the tutorial links to paths that cannot be...

UA through GTM macro: ga.getAll()[0].get('clientId') - ga is not defined

javascript,google-analytics,google-tag-manager
Here is the site - http://www.ssangyong-favorit.ru/ For some reason this code is giving me "GA is not defined" error: ga.getAll()[0].get('clientId') This site has Google Analytics installed on it through GTM and it works and getting stats. The code works for any other site just fine. The problem is that "ga"...

Universal Analyitics not tracking links that lead to popups

php,html,google-analytics,universal-analytics,event-tracking
I recently took over a small school website that was using some really convoluted analytics like a mix of UA and GA. So I stripped out all of the old analytics code, made a new account, and got everything running with UA. I'm only tracking link clicks so the code...

First Android app: I want to track with Google Analytics before I publish it

android,google-analytics
I want to publish my first Android app and I've just managed to implement Google Analytics (GA) with this code in my main class within the onCreate method: // gA Tracking Tracker t = ((gA) getApplication()).getTracker(gA.TrackerName.APP_TRACKER); t.setScreenName("MainActivity"); //Send a screen view. t.send(new HitBuilders.ScreenViewBuilder().build()); // Set the log level to verbose....

How to track traffic by domain in Google Analytics?

google-analytics
I am using Google Analytics in an embedded form. This form will be placed on various websites, and I want to track the traffic with GA. Creating a new property in GA for each website that embeds the form is not an option. As such, I'm looking to track traffic...

analytics api oauth2callback redirect in codeigniter

php,codeigniter,google-analytics
I have an issue in codeigniter trying to do this example: Hello Analytics API: PHP quickstart for web applications Always is redirecting to the auth page https://accounts.google.com/o/oauth2/auth?response_type=code I think that the problem is that I can't get the code : $_GET['code'] in the file oauth2callback.php(see the example file in the...

Fetching Google Analytics profiles using Garb

ruby-on-rails,ruby,google-analytics,google-oauth2,garb-gem
I use Garb(0.9.8) to fetch data from Google Analytics from our server directly using OAuth1. As Google only supports OAuth2 now so I switched to Signet gem and used a service account to get a access_token from the server directly as we need only server to server interaction. key =...

Regex for value less than X

regex,google-analytics
I have a website which uses google analytics to collect event values (annual salaries). I want to see the average event value, but it is often skewed by people entering exceptionally large values. I want a regex which will filter out values above 5 million (5000000). Or, if it’s easier,...

Multi tenant Google Analytics

google-analytics
I have a multi tenant site that serves two domains: "a.com" and "b.net". I want to setup Google Analytics so as to have separate information for these two domains, for example, I would like to see visitors, etc, for each tenant independently of the other. Do I need two different...

Google Analytic - Ecommerce Product Lists

javascript,google-analytics
I'm using Enhanced Ecommerce tracking in my website, but for some reason product lists views are not being registered. Here is a screenshot from analytics When I print a listing, I set the list name in the "category" attribute of each product, like this: ga('ec:addImpression', { 'id': 15, 'name': "Product...

Send analytic data to different domain without response

javascript,jquery,google-analytics,cross-domain,analytics
Precondition I own mysite.com I do not own othersite.com, but I can embed javascript code there Question How to send analytic data from othersite.com to mysite.com ? Expected : othersite.com client -> mysite.com server Not expected : othersite.com client -> othersite.com server -> mysite.com server Its principle seems like to...

Google Analytics Universal Ecommerce data not being recorded

javascript,google-analytics,universal-analytics
I have been trying to move my Google Analytics E commerce tracking over to universal but I am having a few problems. The tracking itself is working fine but not the e commerce. I have enabled ecommerce tracking in google analytics and have added the following code: inside printerlandtest.co.uk.cara.init.js: (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){...

Using more than one field with IN ( ) for a sub-query

google-analytics,google-bigquery
In Google BigQuery, I would have to do something like: SELECT hits.item.productName FROM [‘Dataset Name’ ] WHERE date, visitId, fullVisitorId IN ( SELECT date, visitId, fullVisitorId FROM [‘Dataset Name’ ] WHERE hits.item.productName CONTAINS 'Product Item Name A' AND totals.transactions>=1) However, this does not seem to be supported. What alternatives do...

GoogleAnalytics - Group events by users

android,google-analytics,google-analytics-v4
I used the Google's developer guide's example to create an event for my Android app to see it in my Google Analytics account: // Get tracker. Tracker t = ((AnalyticsSampleApp) getActivity().getApplication()).getTracker( TrackerName.APP_TRACKER); // Build and send an Event. t.send(new HitBuilders.EventBuilder() .setCategory(getString(categoryId)) .setAction(getString(actionId)) .setLabel(getString(labelId)) .build()); The problem is that all the...

Android: Couldn't find GA library on maven

java,android,maven,google-analytics
I am trying to add a library dependency from my Android Studio for below: 'com.google.android.gms:play-services-analytics:7.5.0' However, I couldn't find the package.I even searched for it on search.maven.org but couldn't find it.However in the google docs it is mentioned :developers.google.com/android/guides/setup Can someone point the mistake I am doing?Meanwhile I acheived my...

google analytics code on landing page and cookie law

jquery,google-analytics,seo
New EU cookie law do not allow page to set cookies on first load and until user make any action, scroll is consider as implicit acceptance I'm not sure if ga('set', 'anonymizeIp', true); is enough to allow google analytics to be considered as non profiling cookie how can i activate...

Tracking different groups of 'logged in' users

google-analytics
I'm having a bit of a problem tracking groups of users. On our site we have two different kinds of "logged-in" users. We have 'sellers' and 'buyers'. Is there a way to track these two different types of "logged-in" users separately? I've managed to track logged-in users vs not logged-in...

Submit App with cocoapods to itunesconnect

xcode,swift,google-analytics,cocoapods
I have an Xcode Workspace with my app and cocoapods for Google Analytics. I would like to upload the app to the app store with Google Analytics. Should I just click archive in the menu at the top and upload as I usually do or do I need to do...

Google Analytics API authentication

authentication,google-analytics,analytics,google-analytics-api
I was using this code until yesterday: $gaemail = 'my email'; $gapassword = 'my password'; $gaprofileid = 'my profile id'; require 'gapi.php'; $ga = new gapi($gaemail,$gapassword); Today it started giving me the error: Exception: GAPI: Failed to authenticate user. Error: "https://developers.google.com/accounts/docs/AuthForInstalledApps " in C:\wamp\www\projects\gapi.php on line 418 Was there any...

Creating filters for Google Analytics to remove spam

regex,google-analytics
I have successfully managed to filter out hits from certain spammy sites from Google Analytics. It's an ongoing battle, as new sites are popping up all the time and polluting my acquisition/referral results. At present, the following match is used by the GA filter to stop all the sites below...

Insert Google Analytics in php (Am I doing it the right way?)

javascript,php,google-analytics
I'm trying to load Google Analytics on every file using php. This is not a site, these are some affiliate links structure with javascript redirectiib, so I decided to implement GA tracking code on them. They basically work like this: The root folder is affiliatestuff, and it has: googleanalytics123.php (File...

GoogleAnalytics custom dimension and metric values not updated

android,google-analytics,google-analytics-v4
I created a custom dimension and metric and am trying to fill it with data from an Android app. I created a new dashboard of a table using the custom dimension (user id which is declared at the user scope) and the custom metric (bad attempts which is at the...

How to show count of any jstree in google analytics

google-analytics,google-tag-manager
I am using google tag manager to fire tags for my website, I created custom javascript variable which returns count of my jstree selection (i.e how many users selected how many items) and i placed a trigger on this count, just wanna know if there is any way that i...

Swift 1.2: GAI -> Cannot invoke 'send' with an argument list of type '(NSMutableDictionary!)'

ios,objective-c,swift,google-analytics,xcode6
I'm trying to convert this into Swift 1.2: GAI.sharedInstance().defaultTracker.send(GAIDictionaryBuilder.createEventWithCategory("ui_action", action: "app_launched",label:"launch",value:nil).build()) This is my best attempt: let build = GAIDictionaryBuilder.createEventWithCategory("ui_action", action: "app_launched",label:"launch",value:nil) GAI.sharedInstance().defaultTracker.send(build: [NSObject : AnyObject]) But it keeps on resulting into this: Cannot invoke 'send' with an argument list of type '(NSMutableDictionary!)' Could someone...

Get function in Google Analytics API

php,google-analytics,analytics,google-analytics-api
I'm trying to fetch some data using the analytics API, the example i have is this: function getResults(&$analytics, $profileId) { // Calls the Core Reporting API and queries for the number of sessions // for the last seven days. return $analytics->data_ga->get( 'ga:' . $profileId, '7daysAgo', 'today', 'ga:sessions'); } and the...

Google Analytics Event Tracking Form select

javascript,jquery,forms,google-analytics
i´m trying to track the selected option values. I´m getting this error in console when i track the form: Expected a number value for the field: "eventValue". but found: "string". html code: <select name="fornoyd_service_nybil" id="liste_nybil" class="liste"> <option value=""></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option...

Use sed to insert analytics code to most html files

html,bash,sed,google-analytics
I have so many static html files (well over a thousand) without Google Analytics code. my challenge is, not all html files are without Analytics code. this is the folder structure of the files that should have Analytics code added: user/[user ID]/sites/[site ID]/ there are more than one html files...

Google PHP API Analytics gives strange userRateLimitExceeded

php,google-analytics,google-api-php-client,quota
Since GAPI stopped working two days ago I had to rewrite some code for my Google Analytics dashboard. I decided to use the Google API PHP Client (https://github.com/google/google-api-php-client) I got it all working pretty nice at my local Vagrant Ubuntu server but when I deploy the code to my remote...

Custom dimension in collective.googleanalytics report

python,google-analytics,plone,google-analytics-api,plone-4.x
I'm using collective.googleanalytics (https://pypi.python.org/pypi/collective.googleanalytics) to add some GA reports to a plone site. How can I use custom dimensions (like ga:dimension1 or ga:dimension2) in a new google analytics report? I can't see any related option in Query Dimensions field....

Google Analytics Regular Expressions for Filters

regex,google-analytics
I'm trying to block out a huge amount of spam some of our websites are receiving via spam referral visits, so I've created the following regular expression: .*(event-tracking|porn|hulfington|free-share-buttons|buttons-for-your-website|Get-Free-Traffic|darodar|best-seo-offer|buy-cheap-online|theguardlan|googlsucks).* I've then gone into Analytics > Admin > Filters > +New Filter > Custom Filter > Exclude Referral > and then added...

Inaccurate Event Value in Google Analytics

google-analytics,universal-analytics,event-tracking
I have problem with event in Google Analytics. the Event Action shows inaccurate(negative) value in large amount. Screenshot : Event Tracking code for Event Action (Play Done) : ga('send', 'event', { eventCategory: 'Mziiki Song Streaming', eventAction: 'Play Done', eventLabel: song_title, eventValue: total_sec}); Here, song_title & total_sec is dynamic values. Any...

Goggle Analytics - Demographics - IDFA

ios,cordova,google-analytics,idfa
i have been googling this to try and confirm - My understanding is apple now reject apps using IDFA without actually serving Adverts, For the demographics feature of Google analytics the documentation says that IDFA collection must be enabled. There are lots of articles around how the latest version of...

Google analytics not registering my app as a source of traffic to other sites

javascript,ruby-on-rails,redirect,google-analytics,http-referer
I am working on an app which is a essentially an aggregator of links to other websites. However, instead of linking directly to websites, the links on my app point to an endpoint on my app -- /redirect/:uuid, which in turn performs a 301 redirect to the respective sites: User...

Track Links Using Events - Race Conditions

javascript,angularjs,javascript-events,google-analytics,adobe-analytics
I am building AngularJS applications which have common header with links to each of the application: <a href="https://app1.company.com">App1</a> <a href="https://app2.company.com">App2</a> Each application is running on its own subdomain and when user clicks a link on the header - page redirects to that application. I have to track user actions with...

Titanium Missing Google Analytics when Starting App

android,node.js,google-analytics,titanium
I am using Titanium 3.5.1 to finish development on an app started by a colleague. The app works fine for him and runs in the Android Emulator just fine. Also another colleague installed Titanium 3.5.1 on his Mac and started the app up just fine, no changes at all. For...

GA query to return unique count number

google-analytics,google-analytics-api
In Google Analytics I have set up set a custom dimension that contains a string of tags (ga:dimension1). Data Example: "tag1,tag2,tag3". I also use events. I use Query Explorer to test some custom reports. For tag2 it is working like this: metrics: ga:totalEvents dimensions: ga:dimension1 sort: ga:totalEvents filters: ga:dimension1=~(tag2) I...

Call JS function on form submit before http request occurs

javascript,php,google-analytics
I want to pass a selected checkbox value, when a user submits (POSTs) a form, to Google Analytics to track as a custom metric within Google Analytics dashboard. The user will submit their choice to the server which will first call the JS sendDataToGA(selectedOption) { function to pass that data...

GA Ecommerce tracking data not being sent

javascript,google-analytics
I have the following ecommerce tracking code. I am making use of multiple trackers. The pageviews are getting tracked correctly but when I view the ecommerce reports no data is coming through. What am I missing? (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] =...

Google Analytics: filter to show full URI in reports, but only for subdomain

google-analytics
I need to track a subdomain under an existing property that is already tracking my domain. From the user's perspective they look like one site and I need to see the flow of traffic between them, so they should ideally be under the same property. I'm trying to configure things...

ArrayIndexOutOfBoundsException with Spark, Spark-Avro and Google Analytics Data

scala,google-analytics,apache-spark,avro
I'm attempting to use spark-avro with Google Analytics avro data files, from one of our clients. Also I'm new to spark/scala, so my apologies if I've got anything wrong or done anything stupid. I'm using Spark 1.3.1. I'm experimenting with the data in the spark-shell which I'm kicking off like...

Use data import for update revenue

google-analytics
I have problem with integration our crm system with google analitycs. We want to use offline revenue tracking. We use google tag manager. I setup new Ecommerce tag, and as i see - it works fine. After that I created new data in admin panel with this options My example...

Angularytics (Google Analytics for AngularJS directive) only in production environment

javascript,angularjs,google-analytics,angulartics
I´m using Angularytics in my AngularJS web app. It´s working fine, however, I have three environments (development, test and production) and it´s gathering statistics from both of them. I would like to show analytics only for production enviroment. I have analyzed many options but all of them have some problems....

GoogleAnalytuics enableAutoActivityTracking not working

android,google-analytics,google-analytics-v4
I got the same problem as in this question: enableAutoActivityTracking not automatically tracking activities? The problem is that the automated tracking does not work using Google Analytics. However, calling enableAutoActivityReports does not work in my case. This is the configuration XML file: <?xml version="1.0" encoding="utf-8"?> <!-- Google Analytucs property id....

Extract Google Analytics UA code with Javascript

javascript,google-analytics,web-scraping
How do you extract the Google Analytics UA code on a page with Javascript. Could this be done manipulating the ga function or scraping the site for the code?

How can I pull data from Google Analytics to see the top pages visited from the current page?

google-analytics,google-analytics-api
I would like to create a small sidebar on each page of my website that contains related/popular pages with perhaps the top five pages users visit after reading the current page. I could track and record user movements across the site myself and build the list that way, but as...

Referring to an ENV variable through javascript

javascript,ruby-on-rails,google-analytics,environment-variables
I'm trying to set up Google Analytics, and refer to different tracking ids based on environment. I have a sandbox version of google analytics that has one id, running in a staging environment, and a production version of Google Analytics that has another id, running in a production environment. I'm...

Tracking downloads with google analytics?

php,google-analytics,analytics,tracking
I've been trying to set up code to track downloads of files on a website. I just updated the code from the original tracking snippet to the asynchronous code, ga.js, (in the local.php5 file to track all pages on the site) but I don't know what code to use to...

How to find demographics (and other audience information) for a single page in Google Analytics?

google-analytics,analytics
So Google Analytics has the Audience section, and then under Demographics they tell you age, gender, etc. But that is for the entire site. Can you show that kind of information for a specific page? Eg I'd like to see the age, gender of people who visit my home page....

Google Analytics Unity Not Sending Hits

unity3d,google-analytics
Does anyone have experience of working with the Unity Google Analytics Plugin? So far I've had no luck at all in sending hits. The method I'm using is to place the initialised GAv3 prefab into Assets/Resources and then to use this code attached to the camera in each scene to...

Why Google Analytics show bounce rate 100% and avg time more then 1min

time,google-analytics,bounce,rate
How is possible to have on a page a bounce rate = 100% and for the same page an average time on page > 1min ? screenshot here...

Importing off-line conversion data in to Google Analytics - can'[t select metrics?

google-analytics
I'm trying to import data in to analytics. When I select the "User Data type" it allows me to set user ID as the key, but then I can't select any metrics? Screen here http://content.screencast.com/users/KJPH/folders/Jing/media/b0905e94-7e2f-49a4-8c63-5cbacb8f22cb/2015-05-15_0836.png...

Google Analytics Ecommerce tracking doesn´t track

google-analytics
I have an AngularJS1.0.7 web application. I integrated Google Analytics and now I´m trying to enable ecommerce tracking. However for some reason is not working. I don´t want to paste all my code, but just let me know if you need it. I installed GA debug extension in Chrome, so...

Track conversions from facebook app install ads with iTunes Analytics

ios,iphone,facebook,google-analytics
Is it possible to track conversions from facebook app install ads using iTunes Analytics? Currently Facebook strips out campaign links when setting up the advertisment. Is there any way around this?...

Google Universal Analytics - track multiple events on a single link click

google-analytics
Google suggests this to track outbound links: ga('send', 'event', 'outbound', 'click', url, { 'hitCallback': function () { document.location = url; } }); It uses "hitCallback" to redirect the user to page once the event has been successfully tracked. What is the syntax for tracking multiple events per click? I'd prefer...

How to get custom dimensions of a custom data source via management API?

google-analytics,google-analytics-api
Google Management API provides methods to get list of custom data sources and custom dimensions. However, I need to get the list of custom dimensions that belong to a custom data set, but can't find how. Is it possible at all?...

Google Analytics duplicate transaction id multiple domains

google-analytics,transactions,google-tag-manager
I am implementing Google Analytics (via GTM) on multiple ecommerce sites. I need to record transactions to the client's google analytics account as well as to our single master analytics account, which accrues data for multiple sites. I am wondering if there will be any issues sending duplicate transaction ids...

Read Custom variable's data using google analytics api c#

c#,google-analytics
I'm trying to use the Google Analytics API C# to retrieve custom varaibles's from google analytics. I try this http://www.c-sharpcorner.com/UploadFile/f9f215/how-to-fetch-google-analytics-statistics-and-display-it-in-y and I can read custom dimension data, but I want to read custom variable's data, which is always return null. My code is given below : // path of my...

View organic traffic from all domains simultaneously

google-analytics
I like the home-view of Analytics, since it let's me get a traffic overview of all 45 domains I'm managing inside Analytics. I have been wondering for a long time if it would be somehow possible to have a similar list of all my domains, but the metric I would...

Google Analytics code for tracking 2 domains for one single page

javascript,google-analytics
I'm have a website which is linked to two different domains. In other words I have two domains which point to the same index.html. For analysing the traffic I created an Analytics Account with two properties. Now I would need help with the Javascript. That's what I did so far:...

Extending broadcastReceiver to track INSTALL_REFERRER with multiple services

android,google-analytics,google-play-services,install-referrer
After update google play services to 7.0.3 my custom INSTALL_REFERRER braodcast receiver got broken. I used CampaignTrackingService (which got the update also) to forward the intent to google analytics. in AndroidManifest.xml <receiver android:name="myapp.analytics.installReferrer.InstallReferrerBroadcastReceiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver> And my Custom BroadCastReceiver (and here is the problem): public...

Test Google Analytics on Localhost

javascript,google-analytics
I need to test some custom firing events using Google Analytics. I'd like to test in a local environment. I've set up my test site using apache with server name: my-ga-test.localhost/ According to Can you test google analytics on a localhost address? and Google Analytics docs, I'm able to adjust...

Send uncaught exception to google analytic

android,google-analytics
I'm trying to send uncaught exception to google analytic for two weeks and I cannot find a full example that explain how I can do that, I found many examples but they are not complete and did not work for me, even google-developer is not clear and did not explain...

METEOR_SETTINGS - GA code keeps failing

json,meteor,google-analytics,modulus.io
I have a small app deployed on Modulus.io, and there's a section for a variable called METEOR_SETTINGS, which is a JSON object that holds some API keys. I have two API keys in this object. For whatever reason, my google-analytics tracker always reports that my tracker is MISSING. I'm using...

Does cURL increase bounce rate on Google Analytics report?

php,curl,google-analytics
While developing website up time monitoring application, I do send a cURL request to see whatever the site is running or down, If down then it also try to detect the reason. Therefore I send a cURL request. But my question is, does Google Analytics count it under bounce rate?...

Google Analytics with two property ID's: double counting page views?

google-analytics
I've always used one Javascript GA tracking script on my page, for www.example.com version of my website. It used the property ID UA-XXXXXX-1. However, I read somewhere that pages viewed on your example.com domain (without www.) won't get tracked properly this way. So I added a second property, without the...

Cross-Domain iFrame Tracking with Google Analytics

html,ruby-on-rails,ruby-on-rails-3,iframe,google-analytics
I have a site (rails 3.2) that displays 3rd party news articles within an iframe. One page contains one iframe. I have Google Analytics setup. For this I use segment.io. The tracking script is in the head section of the container page. We have no affiliation with the 3rd party...

GoogleAnalytics HitBuilders.TimingBuilder

android,google-analytics,google-analytics-v4
I'm using GA for an Android App. I'm trying to use user timings to report how much time has passed for some actions in my code, so what I basiclly do is this: At some point in the code I get System.currentTimeMillis(), at another point I do it again and...

google analytics is showing an odd page on my site

php,google-analytics
We pushed a small UI change to the site last night. The google analytics code is in the header and has not been touched at all (entire header for the site and all the pages have not been touched at all) Since the change, we are seeing a lot of...

GoogleAnalytics track time between events

google-analytics,google-analytics-v4
I am using GA on an Android app but this question can be relevant to all platfroms. I track an event the usual way: t.send(new HitBuilders.EventBuilder() .setCategory(getString(categoryId)) .setAction(getString(actionId)) .setLabel(getString(labelId)) .build()); Is there a way to see a report of how much time has passed between such 2 events?...

Getting events to be dependent on the completion of another event

google-analytics
A part of my site generates a handful of events from the same action. The default for Google Analytics is to have the events run independently. However, one of the events needs to happen last. Is there a way to force an order of event completion or at the least...

How to obtain access_token for google analytics?

javascript,google-analytics,google-analytics-api
I am using Google Analytic Embed API. I want auto authorization so that user don't need to enter credential. But I am not getting how to obtain access_token. gapi.analytics.auth.authorize({ serverAuth: { access_token: 'Server side generated token' } }); ...

Send events to two separate google analytics accounts?

javascript,data,google-analytics
Is it possible to send a tracking event to two separate google analytics accounts?

How to include Google Analytics in my app

android,google-analytics
I am trying to include Google Analytics in my app, but after following Google's guide I ended up no where. For some reason I did not see any activity in my Google's Analytics account. So here I am, asking for a simple guide to follow. Please if anybody knows a...

If google analytics is used without cookie storage, are all pageviews a “new” user?

google-analytics
I have a little web browser in my application that hits a webpage using Google analytics. That little web browser has cookies and local disk storage disabled. Are my user analytics going to be skewed because of this? Is every user reported as a new user when in actuality they...

How to create tracking pixel with Google Analytics for 3rd party site?

google-analytics,google-analytics-api,universal-analytics
We need to track conversions that happen on a 3rd party site. The only thing we can place on that site is an image pixel and maybe some JS logic for when to fire it. I know it is possible to fire a conversion using the Measurement Protocol: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#visitor Ideally,...

Why isn't my Google Tag Manager event listener being installed?

javascript-events,google-analytics,google-tag-manager
I have a very simple Google Tag Manager trigger that looks like this: I also have a corresponding tag that uses this trigger. I have published my container, and the tag shows up when previewing/debugging the container: I also see my link's id in the response from GTM. However, I...

Google Analytics: XHR instead of pixel-tracking

javascript,google-analytics,xmlhttprequest
By default google analytics use pixel-tracking technology to send statistics to server. I can see a piece of code in analytics.js for new image object generating. ta = function (a) { var b = M[u]("img"); b.width = 1; b.height = 1; b.src = a; return b } But a browser...

Using Google analytics for Logged in User to get Session Duration

php,google-analytics
I have Community running in PHP, I want to use Google Anayltics to determine, which page has most visit by which username / IP address. Is it possible using Google Analytics ? Can i configure my google analytics to get session duration for each username [if available ] or IP...

Android development: Google Analytics Tracker doesn't work

java,android,google-analytics
I also checked other answers here on SO, but I can't get my Google Analytics Tracker to work. I followed this Google Documentation to set it all up: https://developers.google.com/analytics/devguides/collection/android/v4/advanced I've created a Class called gA.java and have a main class called MainActivity.java. This is my gA class: import com.google.android.gms.analytics.GoogleAnalytics; import...

Google Analytics: Get ride of spam sessions with filter

google-analytics
I see this referral in my sessions. However i've applied a filter to exclude it. www.Get-Free-Traffic-Now.com / referral The filter is even at the top, so i don't know why it is not working: And this is different than the suggested similar question, in the sense that this question uses...

Replacing variable A that contains document.location.path if variable B is not undefined

javascript,function,google-analytics,google-tag-manager
Google Tag Manager in default configuration sends a pageview based on a variable {{Page URL}}. This variable contains document.location.pathname. The website I'm working on has a global js variable trackerParam that modifies the page URL sent to different analytics engines. In most of the cases, it's undefined. What I need...

Having both crashlytics and Google Analytics in the same apps

android,google-analytics,crashlytics
I'm using Crashlytics for bugs reports in my app, but I need some Google Analytics features, is it bad practice to have both, will it affect a lot my performance ( and life battery?) I know it is kind of subjective, but what I need to know is if it...

Tracking AppView events in GA via Google Tag Manager from iOS

ios,google-analytics,google-tag-manager
I am trying to get GA Screens working via Google Tag Manager on iOS. I've configured GTM Tag with the tracking type App View and I am able to see that events are coming but screen name is always (not set) I was trying to set different variables/parameters in GTM...