Tracking E-commerce Google Analytics

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Tracking E-commerce Google Analytics

Postby sabikeuk » Tue Apr 30, 2019 10:15 am

Hello,

I would like to know what is the correct setup to use GA and track orders.

I am currently using OPC Tracking - Google Analytics and OPC Tracking - Google Tag Manager for confirmed, cancelled and refunded orders.

OPC Tracking - Google Analytics with the following settings as per attached picture:
Screenshot 2019-04-30 at 10.10.03.png
Screenshot 2019-04-30 at 10.10.03.png (61.32 KiB) Viewed 5283 times
Screenshot 2019-04-30 at 10.10.03.png

OPC Tracking - Google Tag Manager with the following settings as per attached picture:
Screenshot 2019-04-30 at 10.10.17.png
Screenshot 2019-04-30 at 10.10.17.png (24.14 KiB) Viewed 5283 times
Screenshot 2019-04-30 at 10.10.17.png

Can you please confirm if this is the correct way and correct setup ?

Thanks in advance,
Dan
sabikeuk
 
Posts: 3
Joined: Tue Apr 30, 2019 10:05 am

Re: Tracking E-commerce Google Analytics

Postby admin » Mon May 20, 2019 1:13 pm

hello Dan, i suggest to:
- choose either OPC GTM or OPC GA tracking, but not both (GTM is capable of running GA from GTM and thus GA does not need to be configured in OPC)

for testing/initial purposes to track orders i suggest to choose ALL order statuses within the OPC Tracking configuration (and later on change them to only those which are being used by the land pages), further config (either GTM or GA):
- you can enable all "events" tracking:
-- if you choose at least one order status "purchase event" will be tracked with that order status (no order statuses means, that the purchase won't be tracked)
-- you can further choose to track category + cart + product + impressions (and all available) events

NOTE:
- under some circumstances when OPC tracks the product at the front end it can do an additional ajax call to fetch further data about the product and this ajax call during "add to cart" event can cause session issues on joomla when using "database session" handling:
-- if you use http2 ajax calls can get triggered at the same connection concurrently
-- if you use "database sessions" joomla does not implement session locking and thus it's not clear what session content will be used (and outputed) after the 2 and more ajax calls

to see if your server causes this problem - see if you get "empty cart" upon "add to cart" when using some OPC add to cart tracking (the empty cart can be caused by any other ajax calls on your site that are run at the same time as the click on the button as joomla stores the last session which might had started with the empty cart)


generally:
- GA implementation in OPC supports more data that are sent directly to GA (compared to GTM implementation) + it has standalone Adwords implementation run with the same code in OPC GA (you can enter both your GA ID + Adwords ID within the same OPC GA configuration + choose "global site tag - gtag.js" as GA implementation (this is semi GTM, but not GTM itself)

i suggest that after changes to the OPC config, you get your site checked by a SEO agency if they get all the data they need to properly measure conversions and various events at the site.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Tracking E-commerce Google Analytics

Postby sabikeuk » Wed Jun 05, 2019 7:54 pm

Hi Stan,

thanks for explanation.

I have one issue with tracking (currently it tracks confirmed, cancelled and refunded orders). Orders which are cancelled (either due to not paid via credit/debit card) or at backend by administrator are not cancelled in Google Analytics so they are showing with positive values rather than negative.

Any idea how to sort this out ?
sabikeuk
 
Posts: 3
Joined: Tue Apr 30, 2019 10:05 am

Re: Tracking E-commerce Google Analytics

Postby admin » Tue Jun 11, 2019 6:17 pm

is your "run in administrator" set to yes ?

this should send negative values to GA.

in GA it can look like 2 orders with the same number nulling each other to zero value.

the order status change must happen in "javascript" browser and thus this won't work if it happens via some robot or a connector. (if it does, the data will be sent when the user enters your site next time and his cookie still has the pairing information to opc tracking system )

when changing the order at backend, the g.chrome js console should say that opc tracking was executed and you can review the code with the elements tab.

let me know if this needs further work.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Re: Tracking E-commerce Google Analytics

Postby sabikeuk » Wed Jun 26, 2019 5:30 pm

Hi Stan,
I have set "run in administrator" to yes but know I orders which are updated or changed in admin have double figure in GA, cancelled orders are not with negative figure or not nulling each other, Run just once per positive order status is set to YES.

Any idea ?
sabikeuk
 
Posts: 3
Joined: Tue Apr 30, 2019 10:05 am


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron