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 RNov 21, 2015 at 13:04
Yes. It is exactly like that.– SatishNov 22, 2015 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 RNov 22, 2015 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'.– SatishNov 24, 2015 at 7:46
If you followed the 2Checkout guide for Google Tag Manager code integration for Default Flows available at: https://knowledgecenter.2checkout.com/Documentation/Analytics/Google-Tag-Manager-Code-Integration-for-Default-Flows#Sending_MyOrder_Data_to_Google_Analytics
and still do not see eCommerce data in Google Analytics then you need to address an error in that guide.
- In the Trigger Configuration area, create a trigger named 2Checkout Event, with a Custom Event trigger type. Write 2Checkout event in the Event name field and select All Custom Events for when to fire the trigger, as indicated in the following image.
write 2checkout event in the Event name field. Please note this is case sensitive!
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.
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).
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!