Integrate Google Analytics Code into Your Website in Just One Click
Google Analytics is a site traffic monitoring system developed and maintained by Google. Analytics works by adding a few lines of JavaScript code to all of the pages on your site, and then reports each hit to Google's analytics server, where you can view detailed graphs and statistics, and see trends in site traffic.
On our shared hosting accounts, HostGator offers seamless integration with Google Analytics by adding this JavaScript code to your pages for you. Your site's content will not be modified in any way; instead, each time a page request is made, the JavaScript code will be dynamically added to the page before it is sent to your visitor.
To see what Google Analytics can do for you, check out the official tour at http://www.google.com/analytics/tour.html
Please note that this feature is still under development and is considered experimental.
How to Use the Google Analytics Plugin
1. Log in to your cPanel. (See How to log into cPanel for details.)
2. Click on the "Google Analytics Integration" icon in the "Logs" section.
![]()
3. Near the bottom of the page, under "Domain to Configure," select the domain you wish to add the Google Analytics code.
4. Enter your Google Analytics Account ID for the domain you are configuring. It will look something like UA-12345678-1. You will need to obtain this from your Google Analytics account.

5. Click the "Set Up Google Analytics!" button.
Now, every time someone loads a page from that domain, the visit will be logged in Google Analytics. Log in to your Google Analytics account to see information about your visitors.
Troubleshooting
I do not see the option for Google Analytics Integration in my cPanel.
This feature is currently only enabled on our shared hosting plans such as the Hatchling, Baby and Business plans.
I cannot publish using SiteBuilder after enabling the Google Analytics Plugin.
If you are using the Google Analytics Plugin in the HostGator control panel, this will break the ability to publish your site in SiteBuilder because of the way the substitution engine works.
The fix is to comment out the Google Analytics integration in the .htaccess file or to disable it in the cPanel, publish the website, and re-enable it again.
Please see the section "Google Analytics Plugin Incompatibility" in the article SiteBuilder Publishing Error for specific step-by-step directions on how to resolve the issue.



cPanel is a popular web hosting control panel that helps you manage your hosting account and assists you in creating web sites, managing e-mail addresses, & installing applications to a server.