public function orderComplete($orderModel = null)
{
if ($orderModel) {
$analytics = $this->eventAnalytics("Commerce", "Purchase", $orderModel->number, $orderModel->totalPrice);
if ($analytics) {
$this->addCommerceOrderToAnalytics($analytics, $orderModel);
// Don't forget to set the product action, in this case to PURCHASE
$analytics->setProductActionToPurchase();
$analytics->sendEvent();
InstantAnalyticsPlugin::log("orderComplete for `Commerce` - `Purchase` - `" . $orderModel->number . "` - `" . $orderModel->totalPrice . "`", LogLevel::Info, false);
}
}
}