google-analytics-api

Google Analytics API V3 / OAuth 2

时光总嘲笑我的痴心妄想 提交于 2019-11-30 13:42:21
I've desperately tried to figure this out on my own, and did not want to come to SO with this question, but I'm at my wits end (no thanks to the api / oauth docs). I'm working in PHP and I'm trying to avoid using the Google_Client and AnalyticsService classes, by using REST on the analytics.data.ga.get method. STEP #1: Create an API Project for a Web Application I go to the api console and create a project with analytics services and get an OAuth Client ID and Secret. I'm under the impression that I can create a Client ID for an Installed Application or a Web Application because I'm doing the

Is there a Google Analytics-like solution to track REST calls to a web service? [closed]

我的梦境 提交于 2019-11-30 11:45:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Just wondering if there's any out of the box solution for this, I am not too familiar with the analytics api maybe I can write some simple js that updates analytics before going to my service etc. -- otherwise I am going to have to stick to the good old 'store records in the database'. Any help appreciated! 回答1:

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

半腔热情 提交于 2019-11-30 10:14:36
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 a charm. bUT here we are, our GAPI based codes gives the message: Failed to authenticate user AuthForInstalledApps The only option is to use the oAuth2.0, so what we got here? Google Client Libray: https://github.com/google/google-api-php-client The

Refresh Token for Google Api Php Client

我与影子孤独终老i 提交于 2019-11-30 07:28:09
I am using the Google API Client to access Google Analytics. I want to access the data in offline mode, so I need a refresh token. How do I get a refresh_token? try using the following code: <?php require_once 'apiClient.php'; const REDIRECT_URL = 'INSERT YOUR REDIRECT URL HERE'; const CLIENT_ID = 'INSERT YOUR CLIENT ID HERE'; const CLIENT_SECRET = 'INSERT YOUR CLIENT SECRET'; const ANALYTICS_SCOPE = 'https://www.googleapis.com/auth/analytics.readonly'; // Build a new client object to work with authorization. $client = new apiClient(); $client->setClientId(CLIENT_ID); $client->setClientSecret

API for historical traffic data? [closed]

家住魔仙堡 提交于 2019-11-30 07:22:38
Does anyone know of a public API for historical traffic data? Some quick googling pulls up an API from Yahoo which offers real-time data, but I'd be curious if anyone hosts a service for historical data - i.e., what was the "severity" (one of the attributes the Yahoo API returns) for a given location at a given date and time. (I'm going to guess that such a thing doesn't exist today, or at least no public options, as this would be an immense amount of data to store, but it never hurts to ask...) While yahoo has shut down its traffic apis, there are a number of companies providing traffic

Google Analytics Reduced Session Tracking after v3 SDK update

吃可爱长大的小学妹 提交于 2019-11-30 06:04:04
问题 I am using Google Analytics in my application to track events and sessions . Earlier the version of analytics was v2.x and now I have updated its version to v3 and I can see there is a major difference in the session tracking. I researched and found this v2.x to v3 migration document link: The migration documents states that the session was automatically created in v2.x but we have to create it manually in v3. I tried using the code to manually create session on app launch but still there is

google analytics api query a specific url

99封情书 提交于 2019-11-30 05:14:28
I am accessing the Google analytics API with PHP which works on my end but I'd love to filter the results a bit further. Right now I am using: $OBJresult = $analytics -> data_ga -> get( 'ga:' . $profilID, '2012-01-01', date( "Y-m-d" ), 'ga:visits', array( 'dimensions' => 'ga:pagePath', 'metrics' => 'ga:pageviews', 'sort' => '-ga:pageviews', 'max-results' => '25' ) ); Currently this returns a set of 25 pages sorted by its hits. I would love to restrict the results to a specific path within the server. So e.g. only query domain.com/news and only see what the most hit news pages are. I can filter

svn commit to trigger google analytics annotation?

回眸只為那壹抹淺笑 提交于 2019-11-30 03:48:11
问题 I was wondering if there is a way to create a script that is triggered by an SVN commit, and which would add an annotation in a google analytics profile? This would be handy is something changes in a web app, which will have impact in the analytics of the app eventually. 回答1: There is currently no way to create annotations via either of the Google Analytics APIs (Data Export API and Management API). Both APIs are currently read-only only for all operations. There is a fairly popular ( 95 ,

Is there a Google Analytics-like solution to track REST calls to a web service? [closed]

﹥>﹥吖頭↗ 提交于 2019-11-30 01:18:08
Just wondering if there's any out of the box solution for this, I am not too familiar with the analytics api maybe I can write some simple js that updates analytics before going to my service etc. -- otherwise I am going to have to stick to the good old 'store records in the database'. Any help appreciated! There seem to be a few solutions out there, though they mostly seem to involve changing your API architecture. Apigee Mashery 3scale ReportGrid You could potentially use one of the Google Analytics server-side tracking libraries . I see you're using AppEngine; I also run an API using

kGAIScreenName of Google Analytics for iOS v3 is undeclared?

跟風遠走 提交于 2019-11-30 00:06:44
问题 Today, I found GoogleAnalytics-iOS-SDK have new 3.0 version in Cocoapods. I upgraded and I try to modified the code of manual screen measurement as below: id tracker = [[GAI sharedInstance] defaultTracker]; [tracker set:kGAIScreenName value:@"Detail View"]; [tracker send:[[GAIDictionaryBuilder createAppView] build]]; However, I always get error about kGAIScreenName is undeclared. Even I add GAIFields.h header, it still not work. What did I miss? 回答1: You have to include two more things: