ModulesGarden Documentation
Back Home Home

Google Analytics For WHMCS

  • Navigation
    • Main Page
    • ModulesGarden Website
    • Help
  • WHMCS Modules
    • Abandoned Cart
    • Account Synchronization
    • AdminBolt Licenses
    • Advanced Billing
    • Alibaba Cloud Virtual Machines
    • Amazon EC2
    • Amazon Lightsail
    • Anti-Fraud And Email Verification
    • Client Area Designer
    • Client Area Popup
    • Client Profile Viewer
    • Cloud Billing
    • cPanel Extended
    • cPanel Manage2
    • CRM
    • DigitalOcean Droplets
    • DirectAdmin Extended
    • DirectAdmin Licenses
    • Discount Center
    • DNS Manager
    • Domain Allocator
    • Domain & Email Forwarding
    • Domain Orders Extended
    • Domains Reseller
    • EasyDCIM Colocation
    • EasyDCIM Dedicated Servers
    • Email Notifications Organizer
    • Emoji Picker
    • EURid Registrar
    • Expense Tracker
    • Freshdesk
    • Freshservice
    • Geolocation Hook
    • GoDaddy Domain Registrar
    • GoGetSSL
    • Google Analytics
    • Google Cloud Virtual Machines
    • Google Workspace
    • Hetzner Cloud Servers
    • Hosting Quota Notifications
    • Hosting Renewals
    • IBM Cloud Virtual Servers
    • IP Manager
    • Lagom Smart Order Form
    • Login-Free Payments
    • Marketing Triggers Automation
    • MetricsCube Business Analytics
    • MikroTik WireGuard VPN
    • Multibrand
    • NIC IT Registrar
    • Office 365
    • OpenStack Projects
    • OpenStack VPS & Cloud
    • OVHcloud VPS & Dedicated Servers
    • Password Manager
    • Payment Gateway Allocator
    • Payment Gateway Charges
    • Plesk Extended
    • Plesk Key Administrator
    • Portainer Docker Containers
    • Premium Support Tickets
    • Product Cross-Selling
    • Product Feedback Center
    • Product Free Trial Manager
    • Product Linker
    • Products Reseller
    • Proxmox Mail Gateway
    • Proxmox VE Cloud VPS (Legacy)
    • Proxmox VE VPS & Cloud
    • QuickBooks Desktop
    • QuickBooks Online
    • QuickBooks Online Survey
    • Quotes Automation
    • R1Soft Backups
    • Rackspace Email Extended
    • Recurring Contract Billing
    • Report Generator
    • Resellers Center
    • Server Allocator
    • Secure Support Messages
    • Server Monitoring
    • SMS Center
    • Social Media Login
    • SolusVM 2 VPS & Cloud
    • SolusVM Extended VPS
    • SolusVM Extended Cloud
    • SolusVM Extended Reseller
    • Stripe SEPA Payments
    • Support PIN
    • Support Tickets Allocator
    • Time & Task Manager
    • Unban Center
    • Virtuozzo Hybrid Infrastructure S3
    • Virtuozzo Hybrid Server
    • Vultr VPS
    • WithoutDNS
    • WordPress Manager
    • Zendesk
    • Zimbra & Carbonio Email
  • Legacy Versions
    • Advanced Billing 3.X
    • Domain Orders Extended 2.X
    • Domains Reseller 1.X
    • EasyDCIM Colocation V1.X
    • EasyDCIM Dedicated Servers V1.X
    • EasyDCIM Dedicated Servers V2.X
    • Hosting Quota Notifications 1.X
    • Hosting Renewals 2.X
    • IP Manager 2.5.X
    • Lagom One Step Order Form 1.2.X
    • Multibrand 1.X
    • Office 365 1.0.0
    • Payment Gateway Charges 1.X
    • Proxmox Cloud 2.X
    • Proxmox VPS 2.X
    • Quotes Automation 1.X
    • Recurring Contract Billing 1.5.X
    • Report Generator 3.X
    • Resellers Center 2.X
    • SMS Center 2.X
    • Unban Center 1.X
    • Zimbra Email For WHMCS
    • Zimbra Email 1.X
  • WHMCS Module Bundles
    • Accounting
    • Commerce
    • CRM
    • Customer Experience
    • Domain Reseller
    • Hosting Accounts Provisioning
    • IaaS VPS And Cloud Provisioning
    • On-Premises VPS And Cloud Provisioning
  • WHMCS Widgets
    • Freshdesk Customer Widget
    • ModulesGarden Widget
    • WHMCS Widget For Zendesk
  • Tools And Applications
    • Access Control Tool
    • App Templates Tool
    • Automations Tool
    • Logs
    • Proxmox Proxy Application
    • Task Queue Tool
    • Theme Management Tool
  • Translations
    • Translations Tool
    • Translations
    • Polish Language Translation
    • Polska Wersja Językowa (PL)
  • General
    • 7-Day Free Access
    • How To Change WHMCS Module Language
    • How To Debug Module
    • How To Solve Problems With Module License
    • How To Change WHMCS Module Design
    • How To Update WHMCS Module
    • How To Upgrade WHMCS Module
    • How To Use Configurable Options
  • FAQ
    • Common Questions
    • WHMCS Module Bundles
  • Community
    • Forums
    • Blog
    • Facebook
    • X
    • LinkedIn
    • Instagram
    • Reddit
    About Google Analytics For WHMCS Installation Connection and API Configuration Configuration and Management Tips Update Instructions Upgrade Guide Common Problems

# Google Analytics For WHMCS

  • About Google Analytics For WHMCS
  • Installation
  • Connection and API Configuration
  • Configuration and Management
    • Advanced Configuration
    • Dashboard
    • Logs
    • Queue
  • Tips
  • Update Instructions
  • Upgrade Guide
  • Common Problems

# (opens new window) About Google Analytics For WHMCS (opens new window)

Google Analytics For WHMCS integrates your WHMCS data into Google Analytics, providing deep insights into customer behavior and engagement.
Access a wide range of client activities, from shopping cart actions to account interactions and support ticket changes, all within your Google Analytics account.

Use this powerful module to constantly monitor your customers' actions and respond to their needs immediately.

  • Admin Area Features

    • Track WHMCS User Actions:
      • Ad Conversion
      • Cart Viewed
      • Checkout Started
      • Item Added To Cart
      • Item List Viewed
      • Item Removed From Cart
      • Item Viewed
      • Purchase Completed
      • Support Ticket Closed
      • Support Ticket Opened
      • Support Ticket Replied
      • User Logged In
      • User Signed Up
    • View Dashboard Statistics And Graphs:
      • Event Statistics
      • New Users
      • Active Users
      • Page Views
    • Configure Google Analytics Integration:
      • Enable Integration:
        • Choose Data Sending Method:
          • Requests To API Immediately
          • Add Requests To Cron Queue
        • Provide API Secret
        • Provide Measurement ID
        • Provide Conversion ID And Conversion Label
        • Enable Debug Mode
        • Log Errors And Updates
      • Enable Google Tag Manager Integration
      • Select Client Properties Sent To Google Analytics
      • Select Client Actions Sent To Google Analytics
    • View And Manage Queue Tasks
    • View Module Logs
  • General Info

    • Multi-Language Support
    • Supports Google Analytics 4
    • Supports PHP 8.3 Back To PHP 8.2
    • Supports WHMCS V9.X Back To WHMCS V8.10
    • Requires ionCube Loader V14 Or Later
    • Easy Module Upgrade (opens new window) To Open Source Version (opens new window)

# Installation

This tutorial will show you how to successfully install and authenticate Google Analytics For WHMCS (opens new window).

We will guide you step by step through the whole installation and authentication process.

  1. Log in to our client area and download the module.
  1. Extract the package and upload its content into the main WHMCS directory.
    The content of the package to upload should look like this.
  1. When you install Google Analytics For WHMCS for the first time, you have to rename the 'license_RENAME.php' file.
    The file is located in 'modules/addons/GoogleAnalytics/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.
  1. In order to configure your license key you have to edit the previously renamed 'license.php' file.
    Enter your license key between the quotation marks as presented on the following screen. You can find your license key in our client area → 'My Products'.
  1. Optionally, add a cron job as shown below (5-minute intervals are recommended).
php -q /your_whmcs/modules/addons/GoogleAnalytics/cron/cron.php queue   

This cron makes sure data is sent automatically when using the 'Add Requests to Cron Queue' Data Sending Method.
Do not forget to replace 'your_whmcs' with your WHMCS root location. The cron can also be executed every single minute to perform the action more often.

# Connection and API Configuration

  1. Log in to Google Analytics (opens new window) and create an account for your website if you have not already.
  1. Copy the 'Measurement ID' and 'API Secret'.
    The web stream details page should open automatically, if it does not, you can find it under 'Admin' → 'Property Settings' → 'Data collection and modification' → 'Data Streams'.
  1. Paste them in under 'Configuration' → 'General Settings'.
  1. Go to 'Property details' and find the 'Property ID'.
  1. Copy it into the respective field under 'Dashboard'.
  1. Visit Google Cloud APIs (opens new window) website.
    Open your project, and go to APIs & Service → Credentials.
  1. Then, select Create Credentials → Service Account.
  1. Fill out the service account details.
  1. Open your newly created service account.
  1. Proceed to the Keys tab, and there click Add Key → Create new key.
  1. Select JSON as the key type and click Create todownload the JSON file .
  1. Download your 'credentails.json' file and paste its contents into the Credentials field.
  1. Find client_email and copy the address.
  1. Go back to Google Analytics (opens new window)
    Navigate to 'Admin' → 'Account' → 'Account access management' and use the copied email to create a new user.
  1. The last step is to enable the integration, select what user customer data and which actions you want the module to send to Google Analytics, and submit the configuration.
    Only selected actions will be displayed on the dashboard.

You have successfully installed Google Analytics For WHMCS and connected it with the Google Analytics platform.

# Configuration and Management

With the connection between the Google Analytics For WHMCS module and Google Analytics established, the basic functionality is already active.
You will be able to see your WHMCS data in the Google Analytics panel, and the module's dashboard will provide crucial information at a glance without needing to leave the WHMCS environment.
See the instructions below for more details on the module's configuration and management.
Note: It might take the Google Analytics API about a day to send the updated data back to WHMCS.

# Advanced Configuration

Under the 'Configuration' tab you will be able to specify additional details regarding the module's functionality.
First, focus on 'General Settings'.

  • Data Sending Method - choose how the data is sent to Google Analytics. You can either send API requests immediately or use the cron queue system, potentially reducing the load on WHMCS.
    The cron itself can be found in the Queue tab.
  • Conversion ID - a unique identifier assigned to a specific conversion action in Google Ads. It tracks and reports activities that lead to achieving conversion goals, such as purchases, sign-ups, or other valuable interactions.
    You can find it in the conversion settings in Google Ads. Copy it and paste it with the 'AW-' prefix! Otherwise, an error will occur. More information on how to find it in the Tips section.
  • Conversion Label - a unique tag assigned to a specific conversion action in Google Ads. It allows for more detailed categorization and tracking of different types of conversions, such as various products or services.
    You can configure it in the conversion settings in Google Ads to better understand the effectiveness of your ad campaigns. More information on how to find it in the Tips section.
  • Debug Mode - allows you to preview the content and queries directly in Google Analytics in the DebugView tab without passing them to reports.
  • Log Errors and Updates - allows you to monitor queries sent to Google Analytics and view their content and possible errors in the 'Logs' tab of the module.

Moreover, you may integrate Google Tags Manager with Google Analytics For WHMCS.
To do so, provide the Container ID. You will find it by logging in to your Google Tag Manager account and opening a container.
In the top right corner (next to the Submit and Preview buttons) you'll see some short text that starts with 'GTM-', which is your Container ID.

# Dashboard

This section provides a comprehensive overview of your website traffic and client actions, offering valuable insights into user behavior and engagement on your site.
The dashboard includes:

  • Event Statistics Graph - illustrating various actions your clients perform on your website.
  • New Users Graph - showing the number of your new clients.
  • Active Users Graph - displaying the number of active user visits.
  • Page Views Graph - representing the general traffic on the website.
  • Event Statistics Table - highlighting client actions just as the graph, but in the form of a table.

You can change the scope of each dashboard element by clicking on the 'Change Settings' icon next to it.
For 'Event Statistics' pick the events that are of interest to you, separate selections can be made for the graph and the table.

Logs (opens new window)

The "Logs" tool makes monitoring and managing module activity records simple and efficient. It provides options to categorize, filter, and view detailed entries, giving you control over the logs.
Features like bulk deletion, rule-based deletion, and export options make it easy to organize and maintain your logs.
For detailed guidance on using this tool, check its dedicated article, which is available here (opens new window).

Queue (opens new window)

The "Queue" tool helps you track and manage the tasks created by the module.
It allows you to view and interact with task details, including task IDs, statuses, and related items.
You can filter tasks, execute actions like deleting or running tasks, and even use mass actions for bulk operations.
For detailed guidance on using this tool, please refer to the dedicated article available here (opens new window).

# Tips

  1. Once you turn the debug mode in the addon on, you will be able to track all API requests sent to Google Analytics under 'Admin' → 'Data display' → 'DebugView'.

  2. You may use these requests to create custom definitions under 'Admin' → 'Data display' → 'Custom definitions'.

  3. Follow these instructions to find your Google Ads Conversion ID and Conversion Label:

    • Sign in to your Google Ads account.
    • Go to 'Goals' → 'Conversions'.
    • Select the name of the conversion that you want to use or create a new one.
    • Expand the tab for Tag setup to view the tag details.
    • Select Use Google Tag Manager.
    • Copy the Conversion ID and Conversion Label.

# Update Instructions

An essential guidance through the process of updating the module is offered here (opens new window).

Ensure successful completion of the module update by carefully following each step, thereby preventing data loss or any unforeseen issues.
Additionally, you will find a current list of supplementary actions necessary for a smooth update process there.

# Upgrade Guide

Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability?
There is an option that not only proves to be cost-effective in the long run but also includes prioritized support services, making it a truly valuable investment.

Opt for the Open Source version (opens new window) of your Google Analytics For WHMCS module to unlock these benefits.
Simply click on either the Get Source Code or Upgrade To Lifetime button found on the product's page in our client area to complete the one-step upgrade process, with a dedicated discount already applied.

Follow a comprehensive guide (opens new window) covering the transition process, the advantages it brings, and step-by-step instructions on what to do next after the order has been successfully finalized.

# Common Problems

  1. When you have problems with connection, check whether your SELinux or firewall does not block ports.

  2. Google Analytics API calculates the value of an event without including tax, so if the value seems off, make sure you keep this in mind.