I want to track the flow of customers, like how many of them are coming to checking page and how many of them are making purchase and which page they are going to after purchasing. I use 2Checkout Buy Now buttons on my websites which lead to the checkout page and after successful completion of payment the customer is taken back to a 'thank you' on my website. I tried to track the 'thank you' page (Approved URL in 2Checkout) but it was showing zero visits even though there were payments made on the site recently. It means Google Analytics is not able to track 2Checkout payments and there was something wrong with the integration.

  • Just to be clear, people click on the 2Checkout button to purchase something, they are redirected to the 2Checkout website, pay for it, and then after payment, they return to your website where you have a 'thank you' page? – Alex Reid Nov 21 '15 at 13:04
  • Yes. It is exactly like that. – Satish Nov 22 '15 at 12:33
  • And can you rephrase what you mean by "Approved URL in 2Checkout".. is the thank you page actually on your website? If so, why would it need to be "approved"? – Alex Reid Nov 22 '15 at 23:11
  • There is nothing like approval or anything; it is just a term used by 2Checkout. 2Checkout just calls the URL customer is redirected to after checkout 'approved URL'. – Satish Nov 24 '15 at 7:46

Two scenarios:

If the thank you page lives on your domain and you are getting 0 visits even though you are getting purchases, either the tracking code on the thank you page isn't working or the payment gateway isn't redirecting to that page properly.

If the thank you page lives on the payment gateway page, then this sounds like a cross domain tracking issue. You will need to set up cross domain tracking via Google Tag Manager or Analytics.js. The documentation is here.

Basically you need to pass the GA cookie to the payment gateway (so that you can track referrals, sources, etc.) and the payment gateway needs to implement cross-domain tracking code (linking it back to your domain) so that the gateway in turn can pass your original cookie back to your domain so that the session is never broken. Most payment gateways have GA support built in, otherwise you will need to see if you can implement custom code on the payment gateway site.

When you set up cross domain tracking, it is important to add the domains to the referral exclusion list. Otherwise you will loose the original source / medium variables and your transactions will show up as coming from your own site as a referral (called a self-referral issue).

| improve this answer | |

I know this is an old post, but a recent scenario that just happened to me today and got to solve it prompted me to come back here and post the results for future references.

The solution is simple. Chances are you copy/pasted the Google Analytics snippet properly within your tags as instructed by the Google Analytics website. But it had slipped our attention that in 2Checkout.com's admin dashboard there is a Google Analytics Tracking Number field.

Instructions found on 2Checkout's Knowledge Center:

In your 2Checkout vendor area, https://www.2checkout.com/va/ in the Account tab, Site Management subtab and site settings column, there is a field named Google Analytics. In this field, you will enter your Google Analytics Tracking Number.

Just paste in your Google Analytics tracking number and you're good to go!

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.