Announcement

Collapse
No announcement yet.

Invalid data passed to Google Analytics

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Invalid data passed to Google Analytics

    Problem (seen on SD 2013 and 2014): If you don't charge taxes then layout Google Analytics Transaction Details passes an invalid value of NETQUOTEVAR:TAX1 to Google.

    Reason: this line in Google Analytics Transaction Details needs sanitised:
    Code:
    var act_tax = "<actinic:variable name="Tax1" />"
    Fix:
    Change the above line to:
    Code:
    var act_tax = "<actinic:block if="%3cactinic%3avariable%20name%3d%22IsIncludeTax1%22%20%2f%3e"><actinic:variable name="Tax1" /></actinic:block><actinic:block if="%21%20%3cactinic%3avariable%20name%3d%22IsIncludeTax1%22%20%2f%3e" >0</actinic:block>";
    Note that this will also apply to the Shipping line as well, so it may be worth changing:
    Code:
    var act_shipping = "<actinic:variable name="Shipping" />"
    To:
    Code:
    var act_shipping = "<actinic:block if="%3cactinic%3avariable%20name%3d%22ShippingChargesAreMade%22%20%2f%3e"><actinic:variable name="Shipping" /></actinic:block><actinic:block if="%21%20%3cactinic%3avariable%20name%3d%22ShippingChargesAreMade%22%20%2f%3e" >0</actinic:block>";
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    Many thanks for this. It looks to be very similar to an existing bug: SD-2409.

    The fix is to edit ActinicOrder.pm and put the code:-

    Code:
    else
    	{
    	@Response = FormatPrice($nShipping, $::TRUE, $::g_pCatalogBlob);			
    	$hVariables{$::VARPREFIX . 'SHIPPING'} = ACTINIC::EncodeText2($Response[2]);
    	}
    just before

    Code:
    if ($$::g_pSetupBlob{'MAKE_HANDLING_CHARGE'} && $nHandling != 0)
    This makes the SHIPPING NETQUOTEVAR use the shipping value (0.00) rather than leaving it as the variable name.

    Comment

    Working...
    X