google-analytics-api

Google Analytics API request returns captcha?

浪子不回头ぞ 提交于 2019-12-05 06:14:02
问题 Since yesterday, our connection to the Google Analytics API returns an HTML page with... captcha. Does anyone experience something like this? We use the API with the PHP library. Our code for retrieving a report (its wrapped in our own class but it uses the google/apiclient package): // Create analytics $this->analytics = new \Google_Service_AnalyticsReporting($this->client); // Create the ReportRequest object. $request = new \Google_Service_AnalyticsReporting_ReportRequest(); $request-

Google Analytics for iOS track to multiple account for same event

我怕爱的太早我们不能终老 提交于 2019-12-05 03:56:16
I have two different web property id from two different accounts, say UA-1111-11, UA-2222-22 Now, in my iOS app, I need to log to both of them in the events. Is this even possible? If not, is there any workaround? Here is my high level scenario: I have an existing app where I use google analytics UA-1111-11 to track. Now, I had an agreement with company X (they have UA-2222-22). They told me that I need to send analytics tracking events to their account (UA-2222-22) from my app (and I want to keep UA-1111-11 for my own use). Google is working on their v2 SDK for iOS and Android, and they added

Google Analytics - Tracker Object from Activity

删除回忆录丶 提交于 2019-12-05 02:12:56
问题 I am creating the Google Analytics Tracker object from an Activity. The issue is that I am getting an error in the cast operation done on this.getApplication(). Please let me know how to create a tracker object from an Activity. public void sengToGoogleAnalytics() { Tracker t = ((AnalyticsSampleApp) this.getApplication()).getTracker(TrackerName.APP_TRACKER); t.setScreenName(getString(R.string.memoryhome)); t.send(new HitBuilders.AppViewBuilder().build()); } Log 06-11 11:49:59.510: E

Profiling the Performance of a Google App Script

你。 提交于 2019-12-05 00:53:06
I've written a Google App Script to pull in Google Analytics data into a Google Spreadsheet. It's a fairly long running script making multiple requests to the GA Reporting API, it also uses Google App's ScriptDB. Is there a good way of profiling each step of the scripts performance so I can figure out what areas are taking the longest, so I can begin optimizing in certain areas? The Execution Transcript is very useful for this kind of thing. You can also put Logger.log() statements all over the place that measure the time since the last log. That way you can find areas that take longer to

Where can I view the Google Analytics iOS crash logs?

人盡茶涼 提交于 2019-12-04 23:30:32
问题 In Google Analytics native SDK for iOS (v2 Beta) I found the following line in there documentation: // Optional: automatically track uncaught exceptions with Google Analytics. [GAI sharedInstance].trackUncaughtExceptions = YES; Does this mean, that Google Analytics now also supports crash logs tracking (like BugSense or Crittercism)? But where do I find them in the online interface of Google Analytics? 回答1: On the left panel, expand the Engagement menu and then click on Crash and Exceptions

Ajax API calls in loop need to be executed in order

≡放荡痞女 提交于 2019-12-04 23:16:03
lets say you have a scenario where you needed to create a .csv output in a page's textarea... So I have an array of queries which i loop. Inside the loop im passing a query to an ajax call... I need to append the result of the ajax call into the textarea. My question is how do you get the results printed out in the order they are requested (basically the order in the queries array) //example array to loop. var queries= ['query1', 'query', 'query3', 'query4']; //the textarea where im going to print the results in order later to open in excel as a .csv file var $csvText= $('#some-text-area'); /

Setting Custom Campaign _setCampNameKey not working in Google Analytics ga.js

纵然是瞬间 提交于 2019-12-04 20:50:28
Hello there I want to use some custom campaings created by my application through ga.js . I use some custome campaign and all campaign information and create a hash code of that campaign and put it in the url. My Campaigh URL looks like http://mysite.com/?aff=eyJer5fg4IxOCIsInRleHRfbGlua19pZCI6IjgyIiwiY2FtcGFpZ25faWQiOiIxNCJ9 Now when user landed on mysite.com I check if query parameter aff exists. If yes then I decode the campaign information and try to send it as custom campaign . My tracking code looks like <script> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'my profile id']); _gaq

Can I use Google Analytics to sort out the statistics of my iOS App?

萝らか妹 提交于 2019-12-04 19:45:10
问题 Is this a violation of Apple app development rules? In some forums I just saw that thing. So am afraid of getting rejected by AppStore if I use the same. Help me with this please. And if I can't use Google Analytics SDK then which will be the best analytics method I could implement for my App? 回答1: This is not legal advice, but, as of right now, no apps have been rejected by Apple for using Google Analytics. Google has released an official iOS Google Analytics SDK, and there is no record of

Google oAuth2 tokens invalidated more and more

安稳与你 提交于 2019-12-04 17:51:22
I have a web app built on oAuth2 that has been in production for 5+ years. Users Authenticate and Authorize with Google and grant my application access to the Google Analytics data. All of a sudden I am seeing a surge in failures when refreshing my users oAuth2 tokens. This is the call: https://accounts.google.com/o/oauth2/token Passing these parameters: client_id=xxyyzz client_secret=xxyyzz grant_type=refresh_token refresh_token=xxyyzz This seems to be be on accounts that are less active (i.e. it could be 15+ days between instances where we make calls on their behalf). I have to reach out to

PHP Array and Google Analytics V3 API

╄→гoц情女王★ 提交于 2019-12-04 17:34:41
I am using the Google Analytics V3 PHP OAuht API. When using Simple.php in Google Analytics API Example the data are returned as PHP arrays. I am using the following call to get a more detailed answer to some specific data. It works fine. $ids = "ga:xxxxxx"; $start_date = "2011-01-01"; $end_date = "2011-11-30"; $metrics = "ga:visits,ga:pageviews"; $dimensions = "ga:browser"; $optParams = array('dimensions' => $dimensions); $data = $service->data_ga->get($ids,$start_date,$end_date,$metrics,$optParams); Output of the Array is Data Array ( [kind] => analytics#gaData [id] => https://www.googleapis