analytics.js

Send file download event from server to Google Analytics [duplicate]

ぃ、小莉子 提交于 2019-12-04 11:03:15
This question already has an answer here : How can I track downloads of files from remote websites (1 answer) Closed 2 years ago . A download link is sent to a customer via email : Hello, Please find your product here: https://www.example.com/files/yourfile.zip I'd like to track this download in Google Analytics, as a Goal conversion. Unfortunately, when the user clicks on the link, the file is directly delivered by the web server , without going trough a .html page. How to track such a direct file download inside Analytics? Should I add a dummy HTML page "in the middle", that would use the

Google Universal Analytics Localhost Setup

半城伤御伤魂 提交于 2019-12-04 04:33:23
I'm trying to test GA on localhost after following the suggestions in Can you test google analytics on a localhost address? 1). but I don't see any data being send to my Google Analytics account when browsing on my localhost server and calling the JS script. I know it's executing the JS. What am I doing wrong? Here is my JS code: (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.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','/

How to track multiple accounts using NEW analytics.js?

荒凉一梦 提交于 2019-12-03 04:00:32
问题 I need to track pageview for two accounts on one page, using Google's new analytics.js. There is plenty of tutorials and examples how to do it with older ga.js. But all I have found was this Analytics documentation page. I have written my code to suit the given example, but it only tracks views for first (default) tracker, but not for the second one. <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

How to set up page speed logging for google analytics in analytics.js

血红的双手。 提交于 2019-11-30 12:00:17
Google released the new Analytics.js ( https://developers.google.com/analytics/devguides/collection/analyticsjs/ ). I would like to use it, and I already have everyting set up just fine, apart from site speed. In the "old" ga.js you could do this with _gaq.push(['_setSiteSpeedSampleRate', 50]); This would set it so 50% of the visitors would report sitespeed to analytics. However, for the new analytics.js I cannot get it to work. I tried the following 2: ga('send','setSiteSpeedSampleRate',50); ga('setSiteSpeedSampleRate',50); But no results. Any ideas? Rene Pot Ah, I found my answer. It now has

what are the values in _ga cookie?

徘徊边缘 提交于 2019-11-28 03:01:59
I am using universal analytics . universal analytics creates first party cookie _ga _ga=1.2.286403989.1366364567; 286403989 is clientId 1366364567 is timestamp what is 1 and 2 in _ga cookie? _ga=1.2.286403989.1366364567; 1st Field This is a versioning number. In case the cookie format changes in the future. Seems to be fixed at 1 at the moment. The one above is an old format. Newer cookies have this value set at "GA1" 2nd Field This field is used to figure out the correct cookie in case multiple cookies are setup in different paths or domains. By default cookie are setup at path / and at the

Events not being tracked in new Google Analytics (analytics.js) setup

放肆的年华 提交于 2019-11-27 20:05:29
I have a website that I am using the new Universal Analytics (analytics.js) to track. Everything is setup and working (pageviews, referrals, etc.) using the following code snippet: <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.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-39570713-1', 'site.com'); ga('send', 'pageview'); </script> That is located

Events not being tracked in new Google Analytics (analytics.js) setup

前提是你 提交于 2019-11-26 15:58:48
问题 I have a website that I am using the new Universal Analytics (analytics.js) to track. Everything is setup and working (pageviews, referrals, etc.) using the following code snippet: <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.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js',