ECommerce triggering is not happening.

Google Analytics in 1 month only saw 1 transaction while there where a lot more. Not sure why the 1 transaction shows up?

CommentFileSizeAuthor
#2 1266638_ga_checkout.patch597 bytesIsland Usurper

Comments

bwynants’s picture

uc_googleanalytics_uc_order hook checks for

if ($op == 'new' && arg(0) == 'cart') {

however on the 'new' call this is what the 'args' contains

[01-Sep-2011 18:47:59] Array
[01-Sep-2011 18:47:59] (
[01-Sep-2011 18:47:59] [0] => system
[01-Sep-2011 18:47:59] [1] => ajax
[01-Sep-2011 18:47:59] )

so there is nothing something in the session and uc_googleanalytics_page_alter fails to ad the script...

Island Usurper’s picture

Status: Active » Needs review
StatusFileSize
new597 bytes

Oh, that's an unfortunate side effect of adding the Drupal-style AJAX to the checkout page.

The check for 'cart' in the URL is there to keep from setting the analytics JS for orders created by the administrator in the backend. However, it might not be necessary since that hook only sets a session variable that isn't used until the checkout complete page is viewed. If an admin goes through checkout, he should get the new order in the session, and not whatever order he had created earlier.

bwynants’s picture

Status: Needs review » Reviewed & tested by the community

Exactly the same fix as what I did on my server. Thanks!

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.