This article discusses several ways you can use Google Analytics with a Drupal site.
Google Analytics provides detailed statistics about visitor traffic to your site. To use Google Analytics with Drupal (or with any other type of site), you must first sign up for a Google Analytics account at http://www.google.com/analytics and obtain a unique Tracking ID.
After you have set up a Google Analytics account and have the Tracking ID for your site, you can configure it for Drupal. There are two ways to do this:
There are several modules available that enable you to configure Google Analytics for a Drupal site, and they all function in essentially the same way—all you have to do is specify your Tracking ID, and the module takes care of the rest.
A popular Drupal module for Google Analytics is the aptly named Google Analytics module. To install and configure this module, follow these steps:
Modules are convenient, but they also carry processing overhead with them that may affect site performance. If you prefer not to use a module, you can edit the Drupal theme directly to enable Google Analytics. By embedding a Google Analytics JavaScript code snippet in the theme, you can make sure that statistics gathering is enabled for every page.
To do this, follow these steps:
For more information about Google Analytics, please visit http://www.google.com/analytics.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.