google-analytics

The New 'Universal' Google analytics script on an AJAX based website

我的梦境 提交于 2020-01-12 19:05:22
问题 Google analytics now comes in two options: 'Classic' and the new 'Universal' which has more features. (Actually the 'Universal' analytics has been available to paying customers for a while, but now its available for free!) With the 'Classic' analytics, which looks like this: <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-Y']); _gaq.push(['_trackPageview']); (function() { SOME MORE CODE })(); </script> I have found from much googling that to track

Google Analytics PHP API (GAPI) - Getting number of page views

核能气质少年 提交于 2020-01-12 10:13:00
问题 been working on this for two days now and seem to be getting nowhere. I am using the GAPI Google analytics PHP class. This is the current code I have the now: $ga->requestReportData("[UID]",array('day'),array('visits'), array("day")); What I want to do is get the number of "pageviews" from the "past 7 days". So output would be something like: <?php foreach($ga->getResults() as $result) { ?> Date: <?php echo $result; ?> Page Views: <?php echo $result->getPageviews(); ?> <?php } ?> I am new to

Google Analytics PHP API (GAPI) - Getting number of page views

走远了吗. 提交于 2020-01-12 10:12:49
问题 been working on this for two days now and seem to be getting nowhere. I am using the GAPI Google analytics PHP class. This is the current code I have the now: $ga->requestReportData("[UID]",array('day'),array('visits'), array("day")); What I want to do is get the number of "pageviews" from the "past 7 days". So output would be something like: <?php foreach($ga->getResults() as $result) { ?> Date: <?php echo $result; ?> Page Views: <?php echo $result->getPageviews(); ?> <?php } ?> I am new to

Universal Analytics and signup with Facebook

我是研究僧i 提交于 2020-01-11 22:56:23
问题 I have a website (theneeds.com) that allows signup via Facebook. We're running several campaigns, e.g. on Facebook itself, and we'd like to properly track signups from the different campaigns. The problem is with Universal Analytics: when a user signs up with Facebook, she triggers a new session thus loosing the campaign reference. Two possible solutions are: remove the analytics tracking on the signup form (i.e. the page that causes the new session to start) add facebook.com to the referral

Universal Analytics and signup with Facebook

本小妞迷上赌 提交于 2020-01-11 22:55:05
问题 I have a website (theneeds.com) that allows signup via Facebook. We're running several campaigns, e.g. on Facebook itself, and we'd like to properly track signups from the different campaigns. The problem is with Universal Analytics: when a user signs up with Facebook, she triggers a new session thus loosing the campaign reference. Two possible solutions are: remove the analytics tracking on the signup form (i.e. the page that causes the new session to start) add facebook.com to the referral

Universal Analytics and signup with Facebook

两盒软妹~` 提交于 2020-01-11 22:54:11
问题 I have a website (theneeds.com) that allows signup via Facebook. We're running several campaigns, e.g. on Facebook itself, and we'd like to properly track signups from the different campaigns. The problem is with Universal Analytics: when a user signs up with Facebook, she triggers a new session thus loosing the campaign reference. Two possible solutions are: remove the analytics tracking on the signup form (i.e. the page that causes the new session to start) add facebook.com to the referral

Custom GTM event is not showing

余生颓废 提交于 2020-01-11 14:43:11
问题 I need a custom event ("CasaCalculatorEvent") when clicking a modal. But in dataLayer, when I click its changes from "CasaCalculatorEvent" to "gtm.linkClick". Receive like this in dataLayer: My code: 回答1: try this: <button onclick="logThis()"> click me </button> var dataLayer = window.dataLayer || []; function logThis(){ dataLayer.push({'event':'CasaCalculatorEvent'}); // print the last dataLayer entry alert(JSON.stringify(dataLayer[dataLayer.length - 1])); } Fiddle: https://jsfiddle.net/ajsn

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

谁都会走 提交于 2020-01-11 13:00:57
问题 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 4 years ago . 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

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

点点圈 提交于 2020-01-11 13:00:14
问题 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 4 years ago . 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

Track Goals across subdomains in Google Analytics

独自空忆成欢 提交于 2020-01-11 11:28:47
问题 We have two platforms, a marketing site and a SaaS solution. The marketingsite is on the main domain like www.domain.com and the SaaS solutions is on our subdomain sub.domain.com. I would like to track the conversion rate of the customers signing up on our SaaS solution through our marketingsite. If I go into goals for the marketingsite I can choose a relative path to the goal like www.domain.com/signup-completed, but the actual signup is on sub.domain.com/signup-completed. How can I track