Personal tools
Namespaces

Variants
Actions

Google Analytics For WHMCS

From ModulesGarden Wiki
(Difference between revisions)
Jump to: navigation, search
(Queue)
(About Google Analytics For WHMCS)
 
(78 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
{|
 
{|
 
|style="padding: 10px 0px 10px 0px;"|'''Google Analytics For WHMCS'''  integrates your WHMCS data into Google Analytics, providing deep insights into customer behavior and engagement.<br/> Access a wide range of client activities, from shopping cart actions to account interactions and support ticket changes, all within your Google Analytics account.<br/>
 
|style="padding: 10px 0px 10px 0px;"|'''Google Analytics For WHMCS'''  integrates your WHMCS data into Google Analytics, providing deep insights into customer behavior and engagement.<br/> Access a wide range of client activities, from shopping cart actions to account interactions and support ticket changes, all within your Google Analytics account.<br/>
Use this powerful module to unlock actionable insights!
+
Use this powerful module to constantly monitor your customers' actions and respond to their needs immediately.
 
|}
 
|}
 
<!--a comment maybe? -->
 
<!--a comment maybe? -->
 
*'''Admin Area Features:'''
 
*'''Admin Area Features:'''
 
{|
 
{|
|style="padding: 10px 0px 0px 30px;"|✔ Track WHMCS User Actions With Google Analytics Integration:
+
|style="padding: 10px 0px 0px 30px;"|✔ Track WHMCS User Actions:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Add To Cart
+
|style="padding: 0px 0px 0px 45px;"|✔ Ad Conversion
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Ads Conversion
+
|style="padding: 0px 0px 0px 45px;"|✔ Cart Viewed
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Begin Checkout
+
|style="padding: 0px 0px 0px 45px;"|✔ Checkout Started
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Log in
+
|style="padding: 0px 0px 0px 45px;"|✔ Item Added To Cart
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Purchase
+
|style="padding: 0px 0px 0px 45px;"|✔ Item List Viewed
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Remove From Cart
+
|style="padding: 0px 0px 0px 45px;"|✔ Item Removed From Cart
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Sign Up
+
|style="padding: 0px 0px 0px 45px;"|✔ Item Viewed
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Ticket Close
+
|style="padding: 0px 0px 0px 45px;"|✔ Purchase Completed
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Ticket Open
+
|style="padding: 0px 0px 0px 45px;"|✔ Support Ticket Closed
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Ticket Reply
+
|style="padding: 0px 0px 0px 45px;"|✔ Support Ticket Opened
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ View Cart
+
|style="padding: 0px 0px 0px 45px;"|✔ Support Ticket Replied
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ View Item
+
|style="padding: 0px 0px 0px 45px;"|✔ User Logged In
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ View Item List
+
|style="padding: 0px 0px 0px 45px;"|✔ User Signed Up
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ View Dashboard Statistics:
+
|style="padding: 0px 0px 0px 30px;"|✔ View Dashboard Statistics And Graphs:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Events Statistics
+
|style="padding: 0px 0px 0px 45px;"|✔ Event Statistics
 
|}
 
|}
 
{|
 
{|
Line 94: Line 94:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 60px;"|✔ Log Errors And Information
+
|style="padding: 0px 0px 0px 60px;"|✔ Log Errors And Updates
 
|}
 
|}
 
{|
 
{|
Line 100: Line 100:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 45px;"|✔ Select Client Properties Send To Google Analytics
+
|style="padding: 0px 0px 0px 45px;"|✔ Select Client Properties Sent To Google Analytics
 +
|}
 +
{|
 +
|style="padding: 0px 0px 0px 45px;"|✔ Select Client Actions Sent To Google Analytics
 
|}
 
|}
 
{|
 
{|
Line 117: Line 120:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Supports PHP 8.1 Back To PHP 7.4
+
|style="padding: 0px 0px 0px 30px;"|✔ Supports PHP 8.2 Back To PHP 8.1
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Supports WHMCS V8.10 Back To WHMCS V8.8
+
|style="padding: 0px 0px 0px 30px;"|✔ Supports WHMCS V8.12 Back To WHMCS V8.9
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 0px 30px;"|✔ Requires ionCube Loader V12 Or Later
+
|style="padding: 0px 0px 0px 30px;"|✔ Requires ionCube Loader V14 Or Later
 
|}
 
|}
 
{|
 
{|
Line 131: Line 134:
 
=Installation=
 
=Installation=
 
{|
 
{|
|style="padding: 10px 0px 0px 0px;"|'''This tutorial will show you how to successfully install and authenticate [https://www.modulesgarden.com/products/whmcs/google-analytics Google Analytics For WHMCS.]'''<br />
+
|style="padding: 10px 0px 0px 15px;"|'''This tutorial will show you how to successfully install and authenticate [https://www.modulesgarden.com/products/whmcs/google-analytics Google Analytics For WHMCS].'''<br />
 
We will guide you step by step through the whole installation and authentication process.
 
We will guide you step by step through the whole installation and authentication process.
 
|}
 
|}
Line 141: Line 144:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 10px 15px;"|'''2. In the downloaded file you might find one or two packages that support different PHP versions.'''<br/>
+
|style="padding: 0px 0px 15px 15px;"|'''2. Extract the package and upload its content into the main WHMCS directory. <br/>
In the most recent versions of the module, you will find only one package that supports PHP 7.2 and later.<br/> <!--  If you need a package for the previous versions of PHP, please [https://www.modulesgarden.com/support/ticket/general-support contact our support]. -->
+
|}
+
{|
+
|style="padding: 0px 0px 20px 25px;"|[[File:PHP72_74.png]]
+
|}
+
{|
+
|style="padding: 0px 0px 15px 15px;"|'''3. Extract the package and upload its content into the main WHMCS directory. <br/>
+
 
The content of the package to upload should look like this.
 
The content of the package to upload should look like this.
 
|}
 
|}
Line 155: Line 151:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''4. When you install Google Analytics For WHMCS for the first time, you have to rename the '' 'license_RENAME.php' '' file.'''<br />
+
|style="padding: 0px 0px 15px 15px;"|'''3. When you install Google Analytics For WHMCS for the first time, you have to rename the '' 'license_RENAME.php' '' file.'''<br />
The file is located in '' 'modules/addons/googleanalytics/license_RENAME.php'. '' Rename it from '' 'license_RENAME.php' '' to '' 'license.php'. ''
+
The file is located in '' 'modules/addons/GoogleAnalytics/license_RENAME.php'. '' Rename it from '' 'license_RENAME.php' '' to '' 'license.php'. ''
 
|}
 
|}
 
{|
 
{|
Line 162: Line 158:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 15px 15px;"|'''5. In order to configure your license key you have to edit the previously renamed '' 'license.php' '' file.'''<br />
+
|style="padding: 0px 0px 15px 15px;"|'''4. In order to configure your license key you have to edit the previously renamed '' 'license.php' '' file.'''<br />
 
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'. ''
 
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'. ''
 
|}
 
|}
Line 169: Line 165:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 15px;"|'''6. Optionally, add a cron job as shown below (5-minute intervals are recommended).'''
+
|style="padding: 0px 0px 30px 15px;"|'''5. Optionally, add a cron job as shown below (5-minute intervals are recommended).'''
 
  php -q /your_whmcs/modules/addons/GoogleAnalytics/cron/cron.php queue
 
  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.<br/>
 
This cron makes sure data is sent automatically when using the '' 'Add Requests to Cron Queue' '' Data Sending Method.<br/>
Line 177: Line 173:
 
=Connection and API Configuration=
 
=Connection and API Configuration=
 
{|
 
{|
|style="padding: 10px 0px 20px 15px;"|'''7. Log in to [https://analytics.google.com/| Google Analytics] and create an account for your website if you have not already.'''
+
|style="padding: 10px 0px 20px 15px;"|'''6. Log in to [https://analytics.google.com/analytics/web/?authuser=0#/| Google Analytics] and create an account for your website if you have not already.'''
 
|}
 
|}
 
{|
 
{|
Line 183: Line 179:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''8. Copy the '' 'Measurement ID' '' and '' 'API Secret' ''.'''
+
|style="padding: 0px 0px 15px 15px;"|'''7. Copy the '' 'Measurement ID' '' and '' 'API Secret' ''.'''<br/>
 +
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'.''
 
|}
 
|}
 
{|
 
{|
Line 189: Line 186:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''9. Paste them in under '' 'General Settings'.'''''
+
|style="padding: 0px 0px 20px 15px;"|'''8. Paste them in under '' 'Configuration' '' → '' 'General Settings'.'''''
 
|}
 
|}
 
{|
 
{|
Line 195: Line 192:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''10. Go to '' 'Property details' '' and find the '' 'Property ID' ''.'''
+
|style="padding: 0px 0px 20px 15px;"|'''9. Go to '' 'Property details' '' and find the '' 'Property ID' ''.'''
 
|}
 
|}
 
{|
 
{|
Line 201: Line 198:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''11. Copy it into the respective field under '' 'Dashboard' ''.'''
+
|style="padding: 0px 0px 20px 15px;"|'''10. Copy it into the respective field under '' 'Dashboard' ''.'''
 
|}
 
|}
 
{|
 
{|
Line 207: Line 204:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''12. Visit [https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries#step_1_enable_the_api| Google Analytics Developer Site].
+
|style="padding: 0px 0px 20px 15px;"|'''11. Visit [https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries#step_1_enable_the_api| Google Analytics Developer Site] and click on '' 'Click on Enable the Google Analytics Data API v1'.''
 
|}
 
|}
 
{|
 
{|
Line 213: Line 210:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''13. Click on Enable the Google Analytics Data API v1.
+
|style="padding: 0px 0px 20px 15px;"|'''12. Download your '' 'credentails.json' '' file and paste its contents into the Credentials field.
 
|}
 
|}
 
{|
 
{|
Line 219: Line 216:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''14. Download your credentails.json file.
+
|style="padding: 0px 0px 20px 15px;"|'''13. Find <code>client_email</code> and copy the address.
 
|}
 
|}
 
{|
 
{|
Line 225: Line 222:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''15. Copy and paste its contents into the Credentials field.
+
|style="padding: 0px 0px 20px 15px;"|'''14. Go back to [https://analytics.google.com/| Google Analytics]. Navigate to '' 'Admin' '' → '' 'Account' '' → '' 'Account access management' '' and use the copied email to create a new user.
 
|}
 
|}
 
{|
 
{|
Line 231: Line 228:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''16. Find client_email and copy the address.
+
|style="padding: 0px 0px 15px 15px;"|'''15. 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.''' <br/>
 +
Only selected actions will be displayed on the dashboard.
 
|}
 
|}
 
{|
 
{|
Line 237: Line 235:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''17. Go back to [https://analytics.google.com/| Google Analytics]. Switch to admin view. Find Account access management under Account. Use the copied email to create a new user.
+
|style="padding: 0px 0px 20px 15px;"|'''You have successfully installed Google Analytics For WHMCS and connected it with the Google Analytics platform.  
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GA_12.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:GA_12_1.png]]
 
|}
 
|}
  
<!-- nie ma produktów ani CA
+
=Configuration and Management=
==Product Configuration==
+
 
{|
 
{|
|style="padding: 10px 0px 20px 15px;"|'''16. In order to create and configure a product, go to '' 'Setup' '' → '' 'Products/Services' '' → '' 'Products/Services'.'''''<br />
+
|style="padding: 10px 0px 30px 15px;"|'''With the connection between the Google Analytics For WHMCS module and Google Analytics established, the basic functionality is already active.'''<br/> 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. <br/> See the instructions below for more details on the module's configuration and management.<br/>
Click on '' 'Create a New Group'.''
+
'''''Note:''' It might take the Google Analytics API about a day to send the updated data back to WHMCS.''
 
|}
 
|}
 +
==Advanced Configuration==
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_12.png]]
+
|style="padding: 10px 0px 15px 15px;"|'''Under the '' 'Configuration' '' tab you will be able to specify additional details regarding the module's functionality.'''<br/>
|}
+
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.<br/> The cron itself can be found in the [[#Queue|Queue]] tab.
|style="padding: 0px 0px 20px 15px;"|'''17. Enter your product group name and press '' 'Save Changes'.'''''
+
*'''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.<br/> 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|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.<br/> 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|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.
 
|}
 
|}
 
{|
 
{|
Line 259: Line 260:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''18. Now, create a new product for your GoogleApps.'''<br/>
+
|style="padding: 0px 0px 15px 15px;"|'''Moreover, you may integrate Google Tags Manager with Google Analytics For WHMCS.'''<br/>
To do so, first click on '' 'Create a New Product'.''  
+
To do so, provide the Container ID. You will find it by logging in to your Google Tag Manager account and opening a container.<br/> 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.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GAM_14.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_14.png]]
 
|}
 
|}
 +
 +
==Dashboard==
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''19. Choose the desired product type and product group from the dropdown menus and enter a new name of your products. Press '' 'Continue'. ''
+
|style="padding: 10px 0px 15px 15px;"|'''This section provides a comprehensive overview of your website traffic and client actions, offering valuable insights into user behavior and engagement on your site.'''<br/>
 +
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.
 
|}
 
|}
 
{|
 
{|
Line 272: Line 281:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|'''20. Go to '' 'Module Settings' '' of your product and choose '' 'G Suite' '' from the '' 'Module Name' '' dropdown menu.'''<br/>
+
|style="padding: 0px 0px 15px 15px;"|You can change the scope of each dashboard element by clicking on the '' 'Change Settings' '' icon next to it.<br/>
After choosing the module, make sure to click on the ''''Save Changes'''' button.
+
For '' 'Event Statistics' '' pick the events that are of interest to you, separate selections can be made for the graph and the table.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_16.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_16.png]]
|}
+
{|
+
|style="padding: 0px 0px 20px 15px;"|'''21. Enter your previously obtained '' 'Client ID' as well as 'Client Secret' '' and make sure that '' 'Callback URL' '' is correct.<br/>
+
Then, press '' 'Grant access with Google account'. '''''
+
|}
+
{|
+
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_17.png]]
+
|}
+
{|
+
|style="padding: 0px 0px 20px 15px;"|'''22. You will be redirected to the page with a permission request if the data you entered is correct. Press the '' 'Allow access' '' button.'''
+
|}
+
{|
+
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_18.png]]
+
|}
+
{|
+
|style="padding: 0px 0px 15px 15px;"|'''23. That is it. You will be now redirected to your WHMCS and you will see the following screen.'''<br />
+
|}
+
{|
+
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_19.png]]
+
|}
+
{|
+
|style="padding: 0px 0px 15px 15px;"|'''24. Now, let us move to 'Custom Fields'. Fields with '' 'GoogleApps Domain' '', '' 'GoogleApps PurchaseOrderID' '' , '' 'GoogleApps Alternate Email', 'Mailbox Name' 'GSuiteSubscriptionId' ''  and '' 'GSuiteDealCode' '' variables are added automatically.'''
+
|}
+
{|
+
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_20.png]]
+
|}
+
-->
+
 
+
=Configuration and Management=
+
{|
+
|style="padding: 10px 0px 30px 0px;"|Configuration and management of Google Workspace For WHMCS is very intuitive. Read the below sections to see how easy it is.
+
|}
+
==Basic Configuration==
+
{|
+
|style="padding: 10px 0px 15px 15px;"|Let us begin the process of module .....
+
|}
+
{|
+
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_xxx.png]]
+
|}
+
 
+
Log in to your Google Tag Manager account and open a container. In the top right corner (next to the Submit and Preview buttons) you'll see some short text that starts with GTM- and then contains some letters/numbers. That's your Google Tag Manager .";
+
 
+
The "Conversion ID" is a unique identifier assigned to a specific conversion action in Google Ads. It is used to track and report 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.';
+
 
+
The "Conversion Label" is 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.';
+
 
+
Debug Mode allows you to preview the content and queries directly in Google Analytics in the Debug View 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.';
+
 
+
==Dashboard==
+
{|
+
|style="padding: 10px 0px 15px 15px;"|Let us check your new product on the product page in admin area. It should look like on the screen below.<br />
+
|}
+
{|
+
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_xxx.png]]
+
 
|}
 
|}
  
Line 340: Line 293:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_xxx.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_17.png]]
 
|}
 
|}
 
{|
 
{|
Line 346: Line 299:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_xxx.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_18.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|Moreover additional actions include deleting specific logs, exporting the logs into a '' '.csv' '' file and settings up the auto prune system.
+
|style="padding: 0px 0px 20px 15px;"|Moreover additional actions include deleting specific logs, exporting the logs into a '' '.csv' '' file and setting up the auto prune system.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_xxx.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_19.png]]
 
|}
 
|}
  
 
==Queue==
 
==Queue==
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|If you are using the '' 'Add Requests to Cron Queue' '' Data Sensing Method, the '' 'Queue' '' section is where the requests can be managed.<br/>
+
|style="padding: 10px 0px 15px 15px;"|'''If you are using the '' 'Add Requests to Cron Queue' '' Data Sensing Method, the '' 'Queue' '' section is where the requests can be managed.'''<br/>
 
You will find the information on the cron itself at the top of this section.
 
You will find the information on the cron itself at the top of this section.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_xxx.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_20.png]]
 
|}
 
|}
 
{|
 
{|
Line 367: Line 320:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_xxx.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_21.png]]
 
|}
 
|}
 
{|
 
{|
Line 373: Line 326:
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_xxx.png]]
+
|style="padding: 0px 0px 20px 25px;"|[[File:GAN_22.png]]
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 20px 15px;"|The auto prune system can be set up to automatically delete tasks after a specified time.<br/>
+
|style="padding: 0px 0px 15px 15px;"|The auto prune system can be set up to automatically delete tasks after a specified time.<br/>  
 
This feature can be found under additional actions.
 
This feature can be found under additional actions.
 
|}
 
|}
 
{|
 
{|
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_xxx.png]]
+
|style="padding: 0px 0px 30px 25px;"|[[File:GAN_23.png]]
 
|}
 
|}
  
 
=Tips=
 
=Tips=
 
{|
 
{|
|style="padding: 10px 0px 5px 15px;"|1. The module requires a G Suite Reseller account. To check the current status of your Google Reseller account, navigate to the following site: [https://partners.cloud.google.com/home Google Cloud Partner Portal].<br/> There, you can verify the status and request partner authorization if necessary.
+
|style="padding: 10px 0px 5px 15px;"|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'.''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 5px 15px;"|2. You may use these requests to create custom definitions under '' 'Admin' '' → '' 'Data display' '' → '' 'Custom definitions'.''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|3. Follow these instructions to find your Google Ads [[#Advanced_Configuration|'''Conversion ID''']] and [[#Advanced_Configuration|'''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.
 
|}
 
|}
http://git.mglocal/whmcs-products/google-analytics/-/issues/21
 
  
 
=Update Instructions=
 
=Update Instructions=
Line 398: Line 362:
 
|style="padding: 10px 0px 30px 15px;"|Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability?<br/> 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.<br/>
 
|style="padding: 10px 0px 30px 15px;"|Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability?<br/> 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.<br/>
  
Opt for the [https://www.modulesgarden.com/products/whmcs/google-workspace#open-source-version Open Source version] of your Google Workspace For WHMCS module to unlock these benefits.<br/> 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.<br/>  
+
Opt for the [https://www.modulesgarden.com/products/whmcs/google-analytics#open-source-version Open Source version] of your Google Analytics For WHMCS module to unlock these benefits.<br/> 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.<br/>  
  
 
Follow a [https://www.docs.modulesgarden.com/How_To_Upgrade_WHMCS_Module comprehensive guide] 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.  
 
Follow a [https://www.docs.modulesgarden.com/How_To_Upgrade_WHMCS_Module comprehensive guide] 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.  
Line 405: Line 369:
 
=Common Problems=
 
=Common Problems=
 
{|
 
{|
|style="padding: 10px 0px 30px 15px;"|'''1. When you have problems with connection, check whether your SELinux or firewall does not block ports.'''
+
|style="padding: 10px 0px 10px 15px;"|'''1. When you have problems with connection, check whether your SELinux or firewall does not block ports.'''
 +
|}
 +
{|
 +
|style="padding: 0px 0px 30px 15px;"|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.
 
|}
 
|}

Latest revision as of 11:43, 3 April 2025

Contents

[edit] About Google Analytics For WHMCS

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.2 Back To PHP 8.1
✔ Supports WHMCS V8.12 Back To WHMCS V8.9
✔ Requires ionCube Loader V14 Or Later
✔ Easy Module Upgrade To Open Source Version

[edit] Installation

This tutorial will show you how to successfully install and authenticate Google Analytics For WHMCS.

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.
GAN 1.png
2. Extract the package and upload its content into the main WHMCS directory.

The content of the package to upload should look like this.

GAN 2.png
3. 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'.

GAN 3.png
4. 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'.

GAN 4.png
5. 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.

[edit] Connection and API Configuration

6. Log in to Google Analytics and create an account for your website if you have not already.
GAN 4 1.png
7. 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'.

GAN 5.png
8. Paste them in under 'Configuration' 'General Settings'.
GAN 6 1.png
9. Go to 'Property details' and find the 'Property ID' .
GAN 7.png
10. Copy it into the respective field under 'Dashboard' .
GAN 7 1.png
11. Visit Google Analytics Developer Site and click on 'Click on Enable the Google Analytics Data API v1'.
GA 8.png
12. Download your 'credentails.json' file and paste its contents into the Credentials field.
GA 9.png
13. Find client_email and copy the address.
GA 10.png
14. Go back to Google Analytics. Navigate to 'Admin' 'Account' 'Account access management' and use the copied email to create a new user.
GA 11.png
15. 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.

GA 12.png
You have successfully installed Google Analytics For WHMCS and connected it with the Google Analytics platform.
GA 12 1.png

[edit] 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.

[edit] 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.
GAN 13.png
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.

GAN 14.png

[edit] 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.
GAN 15.png
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.

GAN 16.png

[edit] Logs

All errors and module activity can be found in the 'Logs' section. You can view the details of each log or delete it by using the action buttons.
GAN 17.png
Multiple logs can be deleted at once with the mass action function.
GAN 18.png
Moreover additional actions include deleting specific logs, exporting the logs into a '.csv' file and setting up the auto prune system.
GAN 19.png

[edit] Queue

If you are using the 'Add Requests to Cron Queue' Data Sensing Method, the 'Queue' section is where the requests can be managed.

You will find the information on the cron itself at the top of this section.

GAN 20.png
The list of the queued requests can be viewed, inspected, and managed manually. Use the action buttons to see each request's details, manually run it, or delete it.
GAN 21.png
Multiple tasks can be deleted at once via the mass selection feature.
GAN 22.png
The auto prune system can be set up to automatically delete tasks after a specified time.

This feature can be found under additional actions.

GAN 23.png

[edit] 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.

[edit] Update Instructions

An essential guidance through the process of updating the module is offered here.

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.

[edit] 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 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 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.

[edit] 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.
Navigation
WHMCS Modules
WHMCS Widgets
Tools And Applications
Translations
cPanel Modules
General
FAQ
Community