Analytics
2.1K members online now
2.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Cross Domain Tracking

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi
This is my code on my website success page that i use for cross domain tracking/ecommerce tracking. Oh i have changed the UA. Would this be right. Also does it matter where on the success page the conversion tracking goes, either before or after the ecommerce script. Any thoughts would be greatly appreciated.

<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-xxxxxxx-x', 'auto');
ga('require', 'linker');
ga('linker:autoLink', ['romancart.com']);

ga("require", "ecommerce", "ecommerce.js");
ga("ecommerce:addTransaction", {
"id": "<orderid>", // Transaction ID. Required.
"affiliation": "<storeid>", // store name.
"revenue": "<totalpricenocurr>", // total revenue.
"shipping": "<totalminusshipping>", // Shipping.
"tax": "<passthru>" // Tax.
});
ga("ecommerce:addItem", {
"id": "<orderid>", // Transaction ID. Required. Same as in the transaction data.
"name": "<passthru>", // Product name. Required.
"sku": "<passthru>", // Product SKU.
"category": "<passthru>", // Product Category or variation.
"price": "<totalpricenocurr>", // Product price.
"quantity": "<passthru>" // Product Quantity.
});
ga("ecommerce:send");
ga("send", "pageview");
</script>

 

2 Expert replyverified_user

Cross Domain Tracking

Top Contributor
# 2
Top Contributor

Hi, ulefos,

 

I think what you have should be fine according to the GA documents (https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#loadit). Have you tested it out to make sure it's working? Note that you will need to wait up to 24 hours for the ecommerce data to be processed into your standard reports.

Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Cross Domain Tracking

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Since a couple of days ago the data is being seen in the conversions , ecommerce section, after looking in the conversions, goals, the source/medium is showing hpp.globaliris.com / referral. I put this in the referral exclusion list sometime ago, but its still showing the referral.

 

also adwords is linked but no conversions are listed in my adwords account. The tag is active and last seen but no conversion data in adwords.

Any ideas

Cross Domain Tracking

Top Contributor
# 4
Top Contributor

Hi,

 

You will still see these referrals after adding the domain to the referral exclusion list because returning users who have it set and return as direct will still have that traffic source. They should disappear slowly as the users reach the campaign timeout which is 6 months by default.

If the AdWords tag says active, once a conversion occurs it will show up. There can be few hours delay. Hope this helps.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital