Google Analytics

From WHMCS Documentation

Revision as of 20:22, 1 June 2020 by SarahK (talk | contribs) (Setup)

Google Analytics allows you to track how people find your site, how they navigate through it and how they become customers. You can see trends of pageviews, visits, bounce rate, conversion rate, geographical locations and much more.

And in WHMCS, we've made it easy to install & use by creating an addon module that fully automates the integration process.

Setup

The first step of tracking e-commerce transactions with Google Analytics is to enable e-commerce reporting for your website's profile inside the Google Analytics panel:

Enable the Ecommerce Setting

To do this:

  1. Sign in to your account.
  2. Click the Admin cog icon in the bottom-right corner.
  3. In the View column, click Ecommerce Settings.
  4. Toggle E-Commerce Website from No to Yes.
  5. Click Save.


Next, return to the WHMCS admin area:

  1. Navigate to Setup > Addon Modules.
  2. Click Activate next to the Google Analytics module.
  3. Click Configure.
  4. Enter your Analytics Tracking ID and, optionally, Root Domain (if you use multiple subdomains for your site).
  5. Click Save Changes.

If you are using a custom template set, you need to ensure that your footer.tpl file contains the {$footeroutput} template tag just before the closing </body> tag. This ensures that the tracking code is returned.

Goal Tracking

Once integrated, you can also take advantage of goal tracking. What goal tracking does is allow you to set specific pages that define a user has reached the ultimate intended destination. For most people this is completing an order - placing & paying.

In WHMCS the goal url for a completed & paid order is /whmcspath/cart.php?a=complete This is the page a user ends up on after completing checkout, and making payment for the order using any of the online real-time gateways.

Unfortunately if using an offline gateway such as Mail in Payment or Bank Transfer, where you aren't paid in real-time, then goal tracking will not be able to track the conversions of those users.