Google Analytics Integration


Common task for each commercial website owner is to integrate analytics code. Among number of available analytics solution Google Analytics is the most popular choice. In HostBill you don’t need to edit any files to enable analytics tracking in your billing system.

Note: Analytics plugin is available since HostBill 3.9.9

Activating the module

  1. The plugin is free and available to all HostBill users. In order to activate the plugin go to Settings→ Modules→ Plugins → Inactive, find and activate:

    1.  Google Analytics plugin, if you wish to use 

      1. ga.js
      2. analytics.js
    2. Google Analytics Gtag plugin, if you wish to use gtag/js
  2. Once the plugin is activated you will be directed to Settings→ Modules→ Plugins to configure the module.

Module configuration

  1. Choose module display name
  2. Select if you want the plugin to be accessible for all staff members or only selected staff members.
  3. For Google Analytics Plugin: Select analytics version:
    1. Universal Analytics for analytics.js
    2. classic Google Analytics for ga.js
  4. Under Tracking ID provide your unique tracking ID (also known as Property ID) taken from Google Analytics website.
  5. Under Tracked Domain enter domain name you configure your analytics with 
  6. Custom Code - Enter custom javascript code you wish to be entered after page view event.
  7. Ecommerce tracking - If you've enabled ecommerce tracking in your analytics account, you can enable this and send transaction info
  8. Cross Domain tracking - When enabled, will add 'allowLinker' argument in create method for 'Universal Analytics'

For Google Analytics Gtag Plugin: 

Enable Ecommerce Tracking

To track conversions on purchase from referral source you can enable Ecommerce tracking. When order is completed plugin will automatically add ordered items to the tracking code.

Note: to make sure this code is added for each order made, make sure to redirect your clients to “Order completed page” after purchase. You can enable this option in HostBill settings: