I currently have universal analytics setup and have implemented enhanced eCommerce on our site.
I've used Google Tag Assistant and the analytics debugger in Chrome and all my tags look fine and seem to send with no errors.
Is there any other reason why I wouldn't be seeing any transactions in the GA dashboard under eCommerce?
Here is what is sent when I do a purchase transaction:
ga('create','UA-xxxxxxx-xx' , 'auto');
ga('require', 'displayfeatures');
ga('require', 'ec');
ga('ec:setAction', 'purchase',{"Id":"33483","Name":"Bar","Brand":"Foo","Category":null,"Variant":null,"Price":27.00,"Quantity":18,"Coupon":"","Position":0});
ga('ec:setAction', 'checkout',{"Step":4,"Option":""});
ga('send', 'pageview');
EDIT:
I forgot to add I am testing this from localhost using cookiedomain : none
Related
I am getting the below error in Google Analytics, suggesting I do not have the correct tracking code on my site, though I do. I'm using cookies-eu-banner, and have the below code on my site.
What could be causing this? If I visit the page this is logged in Google Analytics in the real time view, so it seems to be working but the error suggests something is awry.
Code
new CookiesEuBanner(function () {
(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', 'MYTRACKINGCODE', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['subscriptions.thestage.co.uk']);
ga('require', 'displayfeatures');
ga('require', 'linkid', 'linkid.js');
ga('send', 'pageview');
…other tracking code…
}, true);
Error
The Ad Destination URL https://www.MYSITE from the AdWords account MYACCOUNT has accrued a significant number of clicks but a lower-than-expected number of sessions because the page is not tagged with a supported version of the Google Analytics tracking code.
If your pages do not include a supported version of the Analytics tracking code, then Analytics cannot collect data for those pages.
To find the right tracking code for your property, on the Analytics Admin page in the Property column, click Tracking info, then click Tracking Code.
Google Tag Assistant Recordings can help you ensure that your tracking code is sending hits as expected.
I have successfully implemented Cross-Domain tracking with Google Analytics (1 session as user jumps across domain, same _ga cookie on both domains, etc.) However, when the user jumps to the second domain and completes a purchase, the eCommerce transaction is not getting attributed to the utm custom campaign from the first page. It seems you can't pass the utm custom campaign information cross-domain. Is this true? Has anyone ran into this before?
I found my issue, cache. I have done hard refreshes before every test, but I went into Chrome tools and clear EVERYTHING. Cookie, cache, everything. And Cross-Domain tracking for Custom Campaigns started working! For reference here are the scripts for the two sites:
Site 1:
ga('create','UA-xxxxxxx-x'','auto', { 'allowLinker': true });
ga('require', 'linker');
ga('linker:autoLink', ['site2.com']);
ga('require','ecommerce','ecommerce.js');
ga('send','pageview');
Site2:
ga('create', 'UA-xxxxxxx-x', 'auto', { 'name': 'client', 'allowLinker': true });
ga('client.require', 'linker');
ga('client.linker:autoLink', ['site1.com']);
ga('client.require', 'ecommerce', 'ecommerce.js');
ga('client.send', 'pageview');
Also, I added site1.com and site2.com to the Referral Exclusion List in GA and the UA key for site 1 and site 2 are the same.
Instant Articles are configured a couple of months back. We have close to 300+ articles. Everything is working fine as long as Instant Articles is concerned.
I was not aware of the fact that GA doesn't track the page views from Instant Articles. I followed this https://stackoverflow.com/a/38112027/2657566 and added Global Site Tag.
This is my code. After saving it from Wordpress Instant Article Plugin's interface, when I open the Instant Article from my mobile, I dont see any active users.
Can you please let me know if am missing anything. Thanks in advance.
<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','https//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXXX-X', 'auto');
ga('set', 'campaignSource', 'Facebook');
ga('set', 'campaignMedium', 'Facebook Instant Articles');
ga('set', 'referrer', ia_document.referrer);
ga('send', 'pageview');
</script>
Remove https:// and make sure the url is like this(if you’d ridge is not serving https requests) //www.google-analytics.com/analytics.js.
On my website I have a Google Analytics scripts with my own trackercode. One of my clients, who has its own pages on my website, wants to be able to see pageviews of those pages in my websites under his own GA account.
I have tried the following code:
ga('create', 'My-code', 'auto');
ga('send', 'pageview');
ga('create', 'client code', 'auto');
ga('send', 'pageview');
But that doesn't seem to have the result I'm looking for.
I've deployed website that is running on server on local network and I would like to track traffic with Google analytics.
Following code, that was generated by google analytics, is placed in pages that I would like to track
<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-XXXX-Y', { 'cookieDomain': 'none'});
ga('send', 'pageview');
</script>
This line of code was modified according to this topic.
ga('create', 'UA-XXXX-Y', { 'cookieDomain': 'none'});
When I visit my admin page on Google analytics site it says under Status that Tracking is not installed.
Page was visited from several computers but it seems that page view info is not getting to Google servers.
Am I missing something?
Another way around would be to add a FQDN to your local /etc/hosts file, e.g.
127.0.0.1 localhost.dev
Point your browser to http://localhost.dev/ instead.
At the end it seemed that inserted code was enough. It just required some time for google servers to get and process the information.