google-analytics-api

AngularJS $location.path(path) not updating at first

狂风中的少年 提交于 2019-12-06 16:06:15
I have a piece of code where I call $location.path(name) and nothing seems to happens (at first). I can call console.log($location.path()) and it does show the new path -- but the view doesn't change. Chain of events (some asynchronous): I have two controllers (and matching views), MainCtrl and CpugraphCtrl, and a Service GetDataService and one external data API (Google). button in Main view calls function in MainCtrl that calls function in GetDataService that calls google client API gapi.client.load() with a callback to function in GetDataService, which uses $rootScope.$broadcast('GraphUpdate

Google Developers Console: how do I register a new application?

扶醉桌前 提交于 2019-12-06 12:59:50
I'm trying to follow this tutorial for Google's Analytics API. The tutorial says "If you haven't already registered your application with the Google Developers Console, then set up a project and application in the Developers Console". The documentation for the Developers Console says "A project consists of a set of applications...", which makes sense. I'm able to create the project, but I don't see any way to create an application within that project. Both pieces of documentation linked above instruct me to click on "Registered apps" in the left sidebar, but there is no such link. (I believe

Google Analytics Data Feed API Error 414 URI Too Large

℡╲_俬逩灬. 提交于 2019-12-06 12:44:28
When using the google analytics data API with the python gdata library, we are assembling a GET request per the instructions in the documentation here: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html We are running into problems however. As our requests get longer, we're occasionally getting a 414 error URI Too Large when we have a lot of filters. Is there any way to use a POST request with the gdata API or otherwise get around the 414? EDIT: Just tried using a POST request and get 403 Target feed is read-only. Is there any way around this restriction? There is a

Data api ga, how to get data for multiple pages?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 12:26:51
I'm using Data api of google to get data in my filters, I'm getting data for page path for single page and I'm stuck at multiple pages. I followed document and passed following query to filters, $filter = 'ga:pagePath=~/about_us.htm,ga:pagePath=~/index.htm'; Is there anything wrong in it? Can someone please help in it. Gwapz Juan You need to add $dimensions='ga:pagePath' to individually query the two pages. I don't see anything wrong with it but it's always good to run your data api calls through the Data Feed Query Explorer . It will show you if it is getting results and show you the proper

Get function in Google Analytics API

岁酱吖の 提交于 2019-12-06 11:26:32
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 function in the Analytics.php file is: public function get($ids, $metrics, $optParams = array()) { $params = array('ids' => $ids, 'metrics' => $metrics); $params = array_merge($params, $optParams); return $this->call('get', array($params), "Google_Service_Analytics

Export data from google analytics attribution model

核能气质少年 提交于 2019-12-06 10:37:55
is there a way to export the data from google analytics Attribution Model comparison tool? I'm searching through all the dimensions an measures but i was unable to find the correct measure. Is this data available through Core API? Is there a combination of measures to calculate the different models? You can use Google's MCF (Multiple Channel Funnel) API: https://developers.google.com/analytics/devguides/reporting/mcf/v3/ The model you can use seems to be limited (Only First and Last) but at least you can export your funnel path and built your own attribution much easier. Hey I have asked

Uncaught TypeError: Cannot read property 'sub' of null in Google Analytics API

Deadly 提交于 2019-12-06 08:57:38
i created one application which uses google analytics api ie https://apis.google.com/js/client.js?onload=load and i was using nicely but suddenly now one error is coming Uncaught TypeError: Cannot read property 'sub' of null after popup comes for username and password, it was working fine before but now it is showing this error. can anyone please help me out with this. Thanks, Mayank This is a bug in the Google API Javascript Client, and my production site is being affected as well. A bug report was filed at https://code.google.com/p/google-api-javascript-client/issues/detail?id=110 , and it

How to programmatically set ga_trackingId property?

断了今生、忘了曾经 提交于 2019-12-06 08:07:06
问题 I have a single app, but depending of user's choice, it will be monitored totally separated in google analytics, so I NEED to set "ga_trackingId" for EasyTracker programmatically. I've tried EasyTracker.getTracker().setAppId(id) with no luck. 回答1: For changing the id for the EasyTracker, do this: onStart() EasyTracker.getInstance(this).set(Fields.TRACKING_ID, "<your_ga_id"); EasyTracker.getInstance(this).activityStart(this); onStop() EasyTracker.getInstance(this).activityStop(this); 回答2: The

How to use segments in Google Analytics API

微笑、不失礼 提交于 2019-12-06 07:25:20
In Google Analytics, we are able to create segments like below: From the Google Analytics API explorer , we can pull the segment information be it by segment id or by its code: I would assume we can just cut and paste that code into the google analytics core reporting v3 reference code like we do with all the other parameters: When I run the code however, I get this error: Arg, there was an API error : 400 : Invalid value 'users::condition::dateOfSession==2015-04-30;ga:sessionCount==1;condition::ga:campaign=@33100;sessions::condition::ga:userType=@Returning Visitor' for segment parameter. I am

Google Api PHP Client Library

自作多情 提交于 2019-12-06 05:11:17
I am trying to use the Google API PHP Client library for Google Analytic v3. I am able to run the simple app I wrote at home, but when I try at the office it doesn't work. When I run the program I am asked to authorize the php app to my google account. After allowing access I get Google_IOException: HTTP Error: (0) couldn't connect to host in C:\wamp\www\google\GoogleClientApi\io\Google_CurlIO.php on line 128 It is necessary to connect to a proxy server at my organization. Does anyone know how to use oauth 2 and the php client library to connect to a proxy server. thanks Below is the code from