Google Analytics E-commerce Tracking

Posted By UKcentric Mon 12 May 2014
Add to Favorites0
Author Message
UKcentric
 Posted Mon 12 May 2014
Supreme Being

Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)

Group: Forum Members
Last Active: Mon 13 Apr 2015
Posts: 43, Visits: 2,159
How is it meant to work?

I see there is a file called UserControls/FrontEnd/EcommerceTracking.ascx which contains the necessary code to track transactions using Google Ecommerce Tracking.

But having gone through the whole checkout process, it never seems to be displayed at any point.

When is it meant to be displayed?

Or in general, how is it supposed to work?

Does it only work with certain payment gateways?

Thanks.
Paul
 Posted Mon 12 May 2014
große Käse

große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)

Group: Administrators
Last Active: Fri 15 Sep 2023
Posts: 806, Visits: 2,737
On most people systems it is displayed in checkoutcomplete.aspx. So you need to ensure you set that up as the return URL, if this is something that isn't passed through from Kartris but is set up at the payment system's end.

On sagepay vsp form, the callback.aspx is used at the return URL, and the callback is essentially done by sending the customer back to this page. So the code shows there in that case.

The code has to run on Kartris and after the payment system because it's obviously client side code that must run in the user's browser.


--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
UKcentric
 Posted Wed 14 May 2014
Supreme Being

Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)

Group: Forum Members
Last Active: Mon 13 Apr 2015
Posts: 43, Visits: 2,159
Thanks, I am trying to get this working first with PayPal, then we can try to get it working with our other payment provider SagePay.
So in PayPal I have set the return page to http://www.oursite.com/CheckoutComplete.aspx?strWipeBasket=yes

IPN URL is set to http://www.oursite.com/Callback-Paypal.aspx as per the Kartris manual.
I can confirm that the config setting general.googleanalytics.webpropertyid is set to our Google property ID.

But when I return to the page after placing an order through PayPal, I am shown the CheckoutComplete.aspx page but the Google Ecommerce tracking code does not appear. I know it is supposed to appear directly below the confirmation messages, but it doesn't show up anywhere.

Any ideas what I am doing wrong?
UKcentric
 Posted Tue 3 Feb 2015
Supreme Being

Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)

Group: Forum Members
Last Active: Mon 13 Apr 2015
Posts: 43, Visits: 2,159
Still no response from Kartris on this issue.

Does ANYBODY have Google Ecommerce tracking working?

We have found out that the EcommerceTracking.ascx control is hidden on our CheckoutComplete.aspx page because when the customer is returned from PayPal, the Session("OrderID") and Session("OrderDetails") are empty.


Why?


How is it supposed to work if these values are empty?
Mart
 Posted Tue 3 Feb 2015
Top Banana

Top Banana - (84,879 reputation)Top Banana - (84,879 reputation)Top Banana - (84,879 reputation)Top Banana - (84,879 reputation)Top Banana - (84,879 reputation)Top Banana - (84,879 reputation)Top Banana - (84,879 reputation)Top Banana - (84,879 reputation)Top Banana - (84,879 reputation)

Group: Administrators
Last Active: Wed 18 Nov 2020
Posts: 148, Visits: 3,450
I don't know much about this system, so i'm guessing... but you're aware that the checkout complete page might be called by many different payment gateways? So its possible your one doesn't pass those values, but others do?
UKcentric
 Posted Tue 3 Feb 2015
Supreme Being

Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)Supreme Being - (25,833 reputation)

Group: Forum Members
Last Active: Mon 13 Apr 2015
Posts: 43, Visits: 2,159
Mart, the Session("OrderID") and Session("OrderDetails") objects aren't values passed by a payment gateway, they are local session objects set by Kartris (or supposed to be).

For ecommerce tracking to work Kartris would have to set these objects in the Checkout.aspx page, and read them back in the CheckoutComplete.aspx page, according to the code.

They are not passed through the payment gateway.

But they are not set by Kartris, hence the object doesn't appear, hence no e-commerce tracking.

It isn't really anything to do with PayPal, this is to do with Kartris.

Why are these vital session objects not set? And how can we solve it?
Paul
 Posted Tue 3 Feb 2015
große Käse

große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)große Käse - (450,192 reputation)

Group: Administrators
Last Active: Fri 15 Sep 2023
Posts: 806, Visits: 2,737
Check in checkout.aspx.vb

There should be this line about 1753:

Session("OrderID") = O_ID

The main issue is to try to get the site not to lose the session when the user returns from paypal. Most sites have a 20 minute session expiry, but some settings can interfere with this, especially on the browser side. It's possible the cookies used to remember the session ID get lost when the user goes to Paypal.

You could try modifying the form tag in checkoutprocess.aspx, to include target="_blank". I think this should make paypal open in a new tab/window, without losing the present page, and possible this might stop a browser set to delete cookies when leaving a site to keep them.


--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top