google-analytics

Google analytics API - Tracking subdomains

送分小仙女□ 提交于 2019-12-05 18:50:36
I have a website where each user registers as subdomain (username.domain.com). I'm tracking all subdomains with the folllowing code: var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXX-X']); _gaq.push(['_setDomainName', '.domain.com']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); I want to show

Google Event Tracker v3

戏子无情 提交于 2019-12-05 18:37:40
I've a problem with the google Event Tracker. Following the official documentation Google develop Documentation i add the xml file with my id. After on the activity i create a new Tracker, and try to push a new event, but the method "sendevent" does not exist. this is my code The import: import com.google.analytics.tracking.android.EasyTracker; import com.google.analytics.tracking.android.GoogleAnalytics; import com.google.analytics.tracking.android.Tracker; //I think i've to only import the tracker and the simple code Long opt_value; Tracker MyTracker; MyTracker.sendEvent("ui_action", "button

Disable Google Analytics when in development

不问归期 提交于 2019-12-05 18:35:48
问题 My question is pretty simple: is there any way for Google Analytics to be disabled automatically when the application is signed with the debug certificate? Means it should be active only in release version. Thank you in advance. 回答1: If you're using ADT 17 and above, you can utilize the BuildConfig class: if(BuildConfig.DEBUG) { GoogleAnalytics googleAnalytics = GoogleAnalytics.getInstance(getApplicationContext()); googleAnalytics.setAppOptOut(true); } The BuildConfig class is automatically

Command ignored. Unknown target: undefined when setting Custom Dimension in Google Analytics tracking code

不打扰是莪最后的温柔 提交于 2019-12-05 18:22:17
问题 I am setting up a Custom Dimension in my Google Analytics Tracking Code, however I am seeing a strange error in the Chrome Console with the Google Analytics Debugger switched on. This is my code which is fired on every page. I am reporting to a regional account as well as a global/rollup account and I have created two trackers to achieve this. <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s

Firebase Analytics not showing screen names and events

僤鯓⒐⒋嵵緔 提交于 2019-12-05 17:39:55
I'm migrating from old google analytics to Firebase Analytics and now I'm tracking the screens using this: mFirebaseAnalytics.setCurrentScreen(SectionManager.getInstance().getCurrentActivity(), name, null /* class override */); And also tryed using this: Bundle params = new Bundle(); params.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "screen"); params.putString(FirebaseAnalytics.Param.ITEM_NAME, name); mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.VIEW_ITEM, params); And I'm tracking events using this: Bundle params = new Bundle(); params.putString("category", "command"); params

Can I use the same Google Analytics tag for a blog subdomain of my site as the main site?

本秂侑毒 提交于 2019-12-05 16:52:07
I have my site.com and blog.mysite.com on a different IP address. Can I use the same Google analytics ID for both sites? Does Google analytics look at what IP address the recorded visitor information is from? If it doesn't, what prevents random sites from including your Google analytics tag and sending random data to your account? You have to modify your script tag a little. Google's FAQs cover this: http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55524 You can run any UA-XXXXX-YY on any website (any domain name, on any IP), it will end in your profile stats. Yes, your stats

Google analytics account ios configuration

蓝咒 提交于 2019-12-05 15:22:03
I'm trying to configure google analytics GoogleService-info.plist file from google developers site . Yesterday i configured one app and had no problem. but today i can not configure my second app to use google Analytics. I Choose App Name and IOS Bundle Id . Then on next step, where it asks to choose service , i choose Analytics , but under Google Analytics Account there is no select box to choose account. how can i fix this? tvalent2 For me I couldn't choose the account because it was pre-filled in. I followed the advice in this answer and it worked. I saw the dropdown after going into the

Google Analytics API v3 authorization to allow access to my data

耗尽温柔 提交于 2019-12-05 14:43:33
问题 I am developing an app that allows users to see my own Google Analytics Data using Google API v3. Everything I researched seems to indicate that users need to login into their Google accounts and grant my app the access before I can start querying the API; however, that's not what I want, I just need my users to see my own Analytics data. How can authorize the API to access my data. I have the client ID and Client Secret, but the OAuth that's implemented by Google's API v3 is asking for an

Google Analytics - async tracking with two accounts

梦想与她 提交于 2019-12-05 14:35:37
I'm currently testing GAs new async code snippet using two different tracking codes on the same page; _gaq.push( ['_setAccount', 'UA-XXXXXXXX-1'], ['_trackPageview'], ['b._setAccount', 'UA-XXXXXXXX-2'], ['b._trackPageview'] ); Although both codes work, I've noticed that they present inconsistent results. Now, we aren't talking huge differences here, only 1 or 2 visits / day every now and then. However, this site is tiny and 1 or 2 visits equates to a 15% difference in figures. Now, the final site has much more traffic, but my concerns are; will this inconsistancy scale with traffic? assuming

Google Analytics API display page views

旧城冷巷雨未停 提交于 2019-12-05 14:23:56
Using .NET MVC 3, I'd like to display page views on each page of my site. I have google analytics set up. I'm aware there is an API, but have no idea where to start. Any pointers for what I need, and more specifically what to be looking at for displaying page views? Create a file in your Views/Shared folder called _GoogleAnalytics.cshtml (using the underscore in the front is a method of indicating a partial view. It has no effect in MVC, it's just a practice I see done a lot in demo's and screen casts. Put your google analytics code in it. (make sure to put in your own identifier from Google)