Article ID: 119641, created on Jan 14, 2014, last review on May 7, 2014

  • Applies to:
  • Business Automation


As Provider I want to integrate the PBA Online Store with Google Analytics (GA) service to track visitors and report e-commerce activity.

Parallels provides official documentation how to include Google Analytics (GA) code into the PBA Online Store pages - Including Google Analytics.

This article provides examples of variables which can be used in the GA JavaScript code in the PBA Online Store pages to track parameters of customers' purchases.


You may find information from Google website useful - Ecommerce Tracking - Web Tracking (ga.js), as variables you may use in GA code are described there and a couple of examples are present.

The parameters of customer's account and order being placed which you may use in the GA code in the PBA Online Store are described below.

  • Transaction ID: Order Number {$smarty.session.OrderInfo.Number} or Order ID {$smarty.session.OrderInfo.OrderID}
  • Total order amount: {$smarty.session.OrderInfo.Total|string_format:"%.2f"}
  • Total tax amount: {$smarty.session.OrderInfo.TaxTotal|string_format:"%.2f"}
  • Customer's location:
    • City: {$account->accountDetails.City}
    • State or province: {$StateName}
    • Country: {$account->accountDetails.Country}

Order may contain multiple items, the piece of JS code for each order item should be defined inside the loop structure like that:

{foreach name=oitem item=itemOrder from=$OrderDetails}
... actual code to process order items ...

The following variables may be used for order items:

  • Transaction ID: Order Number {$smarty.session.OrderInfo.Number} or Order ID {$smarty.session.OrderInfo.OrderID} (same as above)
  • SKU/part number: either {$itemOrder.DetID} if you do not use SKUs or {$itemOrder.SKU} if they are defined and configured
  • Product name: {$itemOrder.Descr}
  • Category: this parameter is not required, may be left empty; if Sales CategoryID is needed you may use one of the variables $SalesCategoryID or $plan->attr->SalesCategoryID
  • Price: {$itemOrder.UnitPrice|string_format:"%.2f"}
  • Quantity: {$itemOrder.Quantity}

Search Words

Google Analytics




Onlien Store

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF