You are here

function uc_googleanalytics_order in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_googleanalytics/uc_googleanalytics.module \uc_googleanalytics_order()

Implementation of hook_order().

File

uc_googleanalytics/uc_googleanalytics.module, line 44
Adds the required HTML and Javascript to the checkout complete page to allow e-commerce statistics tracking through Google Analytics.

Code

function uc_googleanalytics_order($op, &$arg1, $arg2) {
  switch ($op) {
    case 'new':

      // Store the order ID for later use.
      $_SESSION['uc_googleanalytics_order_id'] = $arg1->order_id;
      break;
  }
}