HostGator.com » Support Portal



Google Analytics Integration

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.

Configure Google Analytics for Your Domain Name

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.


cPanelcPanel 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.

cPanel is available on all HostGator Linux hosting plans, including Shared Hosting, Reseller Hosting, VPS and Linux Dedicated Servers.

Article Comments

Michael
Thanks for making the GA integration so easy!!!

HostGator
Thank you for your comments. Just a quick reminder that the comments on this page are not monitored by technical support staff, and that for support issues, it is best to contact us by live chat, phone or email so we can assist you right away.

Although comments are not monitored by technical support staff, they are moderated and read by technical writers. Comments will need to be approved by a moderator before appearing.

Our technical writers do read the comments periodically for the purposes of updating the articles, and do appreciate your feedback, suggestions and corrections to the articles themselves, as well as any suggestions or tips for readers of this article. However, support questions posted here are not guaranteed to be replied to in a timely manner or at all. For support issues, it is best to contact our support staff instead by live chat, email or phone.



Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment