1

I have an affiliate business that serves deals to users. After a deal is clicked, user is redirected to the vendor website where he can complete the transaction. As I also have some revenue from the solely redirect I would like to track these redirects as transactions using Google Analytics Ecommerce tracking.

Normally I would put Enhanced E-commerce tracking code on the redirection page like this:

ga('ec:setAction', 'purchase', {         // Transaction details are provided in an actionFieldObject.
  'id': 'T12345',                        // (Required) Transaction id (string).
  'revenue': '0.25',                     // Revenue (currency).
  'shipping': '',
  'tax': '',
  'affiliation': ''
});

The problem is I don't want anyone looking into the page source code to see that I have 0.25$ for the user redirect.

Is it possible to somehow encrypt the Ecommerce transactions and send them to Google in a way that would be hidden for a basic user?

I'm already tracking the clicks in my internal system (with PHP during the redirect page load), so I was thinking about somehow using Google Analytics Data Import (API) feature to directly import the transactions at this stage. But is it possible to do this?

  • I don't believe it's possible to 'hide' things especially when the code resides client-side. It's possible for you rather than using a value to use a string in another field (revenue accepts only floats). – nyuen Mar 17 '16 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.