google-analytics

Google Embed API format data before calling .execute()

走远了吗. 提交于 2019-12-10 05:29:51
问题 I need to format the response I get from Analytics before showing it inside a Google Chart, I tried editing the response when the on("success" ... method gets fired but I found that it gets called after the .execute() . Is there any way to edit the response after receiving it and before it populates the chart? This is my function: var dataChart5 = new gapi.analytics.googleCharts.DataChart({ reportType: 'ga', query: { 'ids': 'ga:***', // My ID 'start-date': '31daysAgo', 'end-date': 'yesterday'

google analytics tracking on iframe

折月煮酒 提交于 2019-12-10 03:56:26
问题 How to track urls in iframes with Google Analytics? What I do is that I put this code inside the iframe, like I do on the "top" window.. But the iframe isn't tracked in analytics? This should work, but it doesn't.. :( iframe <html> <head> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-35706930-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' ==

Differences between Android and iOS when using Google Analytics in PhoneGap 1.2.0

青春壹個敷衍的年華 提交于 2019-12-10 03:54:27
问题 I've been trying to get Google Analytics to work in PhoneGap 1.2.0 over Android and iOS. What are the main differences between Android and iOS when using Google Analytics in PhoneGap 1.2.0? 回答1: The three main components required and the different parts for Android and iOS. GAP-alytics from phonegap-plugins Android GoogleAnalyticsTracker.java analytics.js iOS GoogleAnalyticsPlugin.h / GoogleAnalyticsPlugin.m GoogleAnalyticsPlugin.js Google Analytics from Google Android libGoogleAnalytics.jar

Is it possible to manually end a Google Analytics Session?

社会主义新天地 提交于 2019-12-10 03:48:56
问题 I would like to divide the traffic between registered and unregistered users with a custom variable. The Analytics documentation suggests to use a session-level custom variable for this purpose. However, what is very common for our users is to log out when they are done using our service, because they are often working on shared computers. At log out, the session-level custom variable would be overwritten by 'unregistered', because this happens in the same session. Is it somehow possible to

How do we dispatch Google Analytics events when iOS app goes to the background?

a 夏天 提交于 2019-12-10 03:16:46
问题 My iOS app has links to Apple's App Store in it and I am trying to track those as events. The problem is that we can't get my app to properly dispatch the GA events before it goes into the background. We are using iOS SDK v2beta4. Here is an overview of the code we are using. You can see we've put in a lot of what I call "insurance policy" code because what we think is the correct way is not working. But even the insurance policy code does not always dispatch the events before my app goes

The method setLocalDispatchPeriod(int) from the type GAServiceManager is deprecated

那年仲夏 提交于 2019-12-10 01:48:20
问题 I have latest Google analytics SDK for android and seems like setLocalDispatchPeriod(int) has been deprecated. What is the fix for this ? There is no where in the internet I could find alternate method for this. And most funniest thing is, google has used this method in their own tutorial of how to get started. Now does does anybody knows any alternate method ? 回答1: The reason for the deprecation is outlined in the ServiceManager JavaDoc: This only works if local dispatching is in use. Local

Testing Google Analytics iOS SDK

混江龙づ霸主 提交于 2019-12-10 01:11:55
问题 Has anyone found a good way to test Google Analytics on iOS? The SDK is really simple but the docs do not discuss how to test or validate. Does the library behave differently on the simulator or when running a debug build config? I setup a delegate GANTrackerDelegate with this delegate method: - (void)trackerDispatchDidComplete:(GANTracker *)tracker eventsDispatched:(NSUInteger)eventsDispatched eventsFailedDispatch:(NSUInteger)eventsFailedDispatch; That method gets called just fine and I see

What does “Safari (in-app) in Google Analytics refer to?”

左心房为你撑大大i 提交于 2019-12-10 01:08:39
问题 Can someone please explain what "Safari (in-app)" means in Google Analytics under Audience | Technology | Browser & OS? For the Google Analytics for our website, we suddenly started to see significant traffic from this source. It sounds like it just means that visitors are coming to us through browsers embedded within apps (e.g. like a web viewing control) except that there doesn't seem to be reason why we should be getting such traffic and so suddenly. We went from zero traffic from this

Access previously stored Visitor-level custom variable

这一生的挚爱 提交于 2019-12-09 23:47:30
问题 In Google Analytics, Visitor-level custom variables are stored in cookies. I'm looking to store some data in a GA custom variable only if no data has been stored in this slot before , i.e. never overwrite visitor-level custom variables. Is there any way I can do that, either by testing whether some data has already been stored, or by retrieving the stored value? There's no _getCustomVar , but is there any way I can do something equivalent without "hacking" into the cookies myself? 回答1: There

php-ga: How to identify organic traffic?

筅森魡賤 提交于 2019-12-09 21:33:26
问题 I'm doing all my Google Analytics server side, but GA is only tracking direct or referrals, and I don't know how to track organic. This is a pice of code that gets either direct or referral: //Campaign is used for the referrals //If not in session and there is a referrer, create campaign from referrer //and add it to the tracker and to session. if (!isset($_SESSION['campaign'])) { if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], parse_url($this->config['url']['base'],