Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Google Anaytics Ecommerce Tracking?


Reply


3 Posts   637 Views

Avatar
inCharge

Community Member, 102 Posts

1 June 2011 at 3:42am

Has anyone added Google Anaytics Ecommerce Tracking?

http://code.google.com/apis/analytics/docs/tracking/gaTrackingEcommerce.html

If so, please can you post the code.

Thanks,
Jules

Avatar
Jedateach

Forum Moderator, 233 Posts

1 June 2011 at 10:33am

Edited: 01/06/2011 10:35am

FYI: this is also an issue on the issue tracker - http://code.google.com/p/silverstripe-ecommerce/issues/detail?id=48
It'll be very useful, once implemented :) I can provide SVN access if someone wants to commit their code to an ecommerce sub-module.

If I've understood their documentation correctly, it should just be a matter of including some JavaScript on the final order page.

Perhaps the implementation could also optionally include event tracking ... ie 'added x to cart' , 'removed x from cart'.

Avatar
inCharge

Community Member, 102 Posts

1 June 2011 at 11:00am

> it should just be a matter of including some JavaScript on the final order page.

Yes, including descriptions & values of order items & modifiers (tax, delivery, etc) and totals. This should be quite easy as final values for modifiers have been saved to the database by this stage, so modifiers themselves don't need to be consulted, and their code doesn't need to be adapted.

Does the order page distinguish between when it's loaded as order confirmation, and when it's loaded from the account page? They are one and the same, right? We don't want Analytics to be told there's another new order every time someone views an old order.

There's a flag on the Order record for 'ReceiptSent' to avoid sending duplicate emails. Maybe something similar is required to prevent double counting in Analytics. Or maybe just one general purpose order status flag would be better.