Difference between revisions of "Google Analytics"
(→Setup) |
|||
Line 6: | Line 6: | ||
<div class="docs-alert-info"> | <div class="docs-alert-info"> | ||
<span class="title">Note</span><br /> | <span class="title">Note</span><br /> | ||
− | The module supports Google Analytics | + | The module supports Google Analytics, Universal Analytics, and Google Analytics 4. |
− | |||
</div> | </div> | ||
Revision as of 20:17, 29 December 2020
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 and use by creating an addon module that fully automates the integration process.
Setup
Note
The module supports Google Analytics, Universal Analytics, and Google Analytics 4.
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:
To do this:
- Sign in to your account.
- Click the Admin cog icon in the bottom-right corner.
- In the View column, click Ecommerce Settings.
- Toggle E-Commerce Website from No to Yes.
- Click Save.
Next, return to the WHMCS admin area:
- Navigate to Configuration () > System Settings > Addon Modules or, prior to WHMCS 8.0, Setup > Addon Modules.
- Click Activate next to the Google Analytics module.
- Click Configure.
- Enter your Analytics Tracking ID and, optionally, Root Domain (if you use multiple subdomains for your site).
- 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. Goal tracking allows you to set specific pages that indicate that a user has reached the ultimate intended destination. For most people, this is completing an order by placing it and paying.
In WHMCS, the goal URL for a completed and paid order is /whmcspath/cart.php?a=complete. This is the page a user sees after completing checkout and paying using any of the online real-time gateways.
Unfortunately, if using an offline gateway such as Mail in Payment or Bank Transfer, with which you aren't paid in real-time, goal tracking will not be able to track the conversions of those users.