google-analytics

Connecting to Google Analytics API in a Rails app [closed]

拟墨画扇 提交于 2019-12-02 13:33:09
Is there a good tutorial available re: how to interact with the Google Analytics API within a Rails app? I've found this gist , but I'm not sure if every step listed in that gist is necessary. If that is a good tutorial to follow, where can I download the "key_file" that's mentioned? I can't seem to find it within https://code.google.com/apis/console/ . Also, where do I find out my API client email address / SERVICE ACCOUNT EMAIL? I can certainly help you out with the key file and service account email. Google is really good at changing their documentation and procedures often and usually not

Android Google Tag Manager

时光毁灭记忆、已成空白 提交于 2019-12-02 13:31:43
问题 I am implementing Google Tag Manager for Android Application V4 as requested by my Marketing team for future use,and I have never worked on GTM for websites so I am naive in this context. I have created account and Container and tags according to instructions on official site. I have linked tag manager with google analytics tracking id. I have written code in my application according to instructions on website and downloaded container to raw folder. When I run my app it gives me warning and

How to Add script codes before the </body> tag ASP.NET

纵然是瞬间 提交于 2019-12-02 13:23:09
问题 Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript and put it before the end of body tag, because this script uses the google analytics variables. How can i achieve this? 回答1: An inelegant but simple approach, if you're able to avoid using ClientScript , would be to just stick a literal in the page where you want your script to be rendered and put

Find a specific line of script using JS/jQuery in GTM

浪子不回头ぞ 提交于 2019-12-02 12:45:06
I want to use Google Tag Manager (GTM) to identify if a virtual page view has been set within the Google Analytics (GA) script (which sits in the <head> ). The GA code is NOT set via GTM. The virtual page view looks like this: ga('send', 'pageview', '/virtual/example1/'); I want GTM to search specifically on every page for just ga('send', 'pageview', '/virtual Is there a line of JS or jQuery I can use to identify this line. Things like getElementById() don't work because there is no ID. Assume it might use innerHTML at some stage but not sure hot to put it all together. From the top of my head

GoogleAnalytics HitBuilders.TimingBuilder

六眼飞鱼酱① 提交于 2019-12-02 12:23:37
I'm using GA for an Android App. I'm trying to use user timings to report how much time has passed for some actions in my code, so what I basically do is this: At some point in the code I get System.currentTimeMillis() , at another point I do it again and subtract the latter from the former to get how much time has passed. I then report it to GA like this: long time1 = System.currentTimeMillis(); ... long time2 = System.currentTimeMillis(); long timingValue = time2 - time1; tracker.send(new HitBuilders.TimingBuilder() .setCategory(timingCategory) .setValue(timingValue) .setVariable

How to track clicks on outbound links

这一生的挚爱 提交于 2019-12-02 11:59:30
[cross-posted on Google Products Forum http://productforums.google.com/d/topic/analytics/ZrB14a-6gqI/discussion ] I am using the following code at http://www.cs.bris.ac.uk/Research/Algorithms/ <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); _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

Formatting a Date in BigQuery

纵饮孤独 提交于 2019-12-02 11:46:29
I am querying 365 days worth of Google Analytics data and the data is exported as: 20170726 What I want is it parsed in some form: 2017-07-26 07/26/2017 07/26/2017 I believe I should be using the FORMAT_DATETIME clause/method to be using accomplishing this, and am have it like this: SELECT FORMAT_DATETIME(%m/%d/%Y, date) date being the field in Google Analytics. Below is for BigQuery Standard SQL and assumes your date field is of STRING type #standardSQL WITH `project.dataset.table` AS ( SELECT '20170726' date ) SELECT FORMAT_DATE('%m/%d/%Y', PARSE_DATE('%Y%m%d', date)) AS `date_string

Recreate GA Funnel on BigQuery

房东的猫 提交于 2019-12-02 11:41:46
I am trying to recreate the GA funnel (custom report on Google360) using BigQuery. The funnel on GA is using the unique count of events that happen on each page. I found this query online that is working for the most part: SELECT COUNT( s0.firstHit) AS Landing_Page, COUNT( s1.firstHit) AS Model_Selection from( SELECT s0.fullvisitorID, s0.firstHit, s1.firstHit, FROM ( # Begin Subquery #1 aka s0 SELECT fullvisitorID, MIN(hits.hitNumber) AS firstHit FROm [64269470.ga_sessions_20170720] WHERE hits.eventInfo.eventAction in ('landing_page') AND totals.visits = 1 GROUP BY fullvisitorID ) s0 # End

Extract part of URL with Google tag manager

不羁的心 提交于 2019-12-02 10:49:42
So i have this url " https://www.site.be/pand/titel-van-het-pand-t8500-17082-4 " and i have to extract the reference number at the back of the url. In this example "t8500-17082-4" with GTM to put into a custom dimension like this: var dimensionValue = 'REFERENCE_CODE_HERE'; ga('set', 'dimension1', dimensionValue); The reference codes at the eind of the url could start with either -t8... or t9... In GTM go to "Variables" -> "NEW" -> "Custom JavaScript" and type: function(){ var myRegexp = /(-t8|-t9)(.*)/g; //assuming you only ever have one "-t8"/"-t9" in the URL var result = document.URL.match

Google analytics track exits within a one-page checkout

…衆ロ難τιáo~ 提交于 2019-12-02 10:22:09
I'm using an ecommerce system called NopCommerce that implements a one page checkout system. This page asks users to fill out details like billing address / shipping address etc before taking payment. The page uses ajax to save these details so the URL doesn't change, there's no internal anchors etc to mark progress. Does anyone know if it's possible using Google analytics to find out where on this page people are exiting? I know there are exit reports but they just refer to pages, not areas within pages. Is this possible and if so how is it implemented? I do not know Nopcommerce, but looking