View Single Post
  #3  
Old 05-08-2013, 09:38 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: X-Payments with Google Analytics Conversion Code

OK. Now this is getting interesting.

Bill suggested looking at file,

/include/checkout_init.php

about line 506, you will see

Code:
$smarty->assign('ga_track_commerce', $ga_track_commerce); $ga_track_commerce = 'N';

Hold on there!

IF $smarty->assign('ga_track_commerce', $ga_track_commerce); is supposed to take the setting from $ga_track_commerce and assign it to smarty, why is the very next line changing this back to 'N' regardless of the switch setting in the google analytics module?

Bill's suggestion was to force the switch to Y, and that does solve the issue -- x-payment credit card sales now have GA tracking code on order_message

Code:
// next line commented out to force ga_track_commerce to Y // $smarty->assign('ga_track_commerce', $ga_track_commerce); $smarty->assign('ga_track_commerce', 'Y'); // next line changed from N to Y // why is line in the code at all? $ga_track_commerce = 'Y';

Surely others must be missing their google analytics tracking if this switch is forced to N

Anyone know what's actually going on here?

PS -- with this edit, all sales now track to GA, all conversion code is present in order_message, as it's supposed to be.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote