Mobile app version of vmapp.org
Login or Join
Deb1703797

: Keep referrers for ecommerce tracking in mixed HTTP and HTTPS environment I use Google Analytics ecommerce:addTransaction to track the revenue after an acquisition. This works without problems, when

@Deb1703797

Posted in: #GoogleAnalytics

I use Google Analytics ecommerce:addTransaction to track the revenue after an acquisition.

This works without problems, when my site uses HTTP only.

But since I redirect the client to a SSL page during the buying process I get the payment service provider domains as referrers instead of the real referrers.

This is the Analytics code on the checkout success page:

ga('create', 'UA-*******-1', 'example.com');
ga('require', 'linkid', 'linkid.js');
ga('send', 'pageview');
ga('require', 'ecommerce', 'ecommerce.js');
ga('ecommerce:addTransaction', {
'id': '<?php echo $transaction['id']; ?>',
'affiliation': '<?php echo $transaction['affiliation']; ?>',
'revenue': '<?php echo $transaction['revenue']; ?>',
'shipping': '<?php echo $transaction['shipping']; ?>',
'tax': '<?php echo $transaction['revenue']; ?>',
'currency': 'EUR'
});
// adding items in a loop with ecommerce:addItem
ga('ecommerce:send');


The client normally lands on a normal http page. Once redirected to https the client stays on https sites. For example:

www.example.com www.example.com/order https://www.example.com/checkout domain.of.paymentprovider.example.net https://www.example.com/success

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme