Skip to main content
wpcrux.com

Back to all posts

How to Set Up Google Analytics For Drupal?

Published on
7 min read

Table of Contents

Show more
How to Set Up Google Analytics For Drupal? image

To set up Google Analytics for Drupal, follow these steps:

  1. Sign in to your Google Analytics account or create a new one if you don't have an existing account.
  2. Once signed in, click on the "Admin" tab located at the bottom left corner of the navigation menu.
  3. Under the "Property" column, click on the dropdown menu and select the website for which you want to set up Google Analytics.
  4. Click on the "Tracking Info" tab under the "Property" column.
  5. From the dropdown menu, select "Tracking Code."
  6. You will see a tracking code snippet displayed on the page. Copy the entire code.
  7. In your Drupal website, log in to the administrative dashboard.
  8. Go to the "Extend" section and search for the "Google Analytics" module.
  9. Install and enable the "Google Analytics" module.
  10. Once enabled, go to the "Configuration" section and click on "Google Analytics" in the dropdown menu.
  11. In the "General Settings" tab, paste the tracking code you copied earlier into the "Tracking Code" field.
  12. Configure any additional settings according to your requirements.
  13. Click on the "Save configuration" button to save your settings.
  14. Google Analytics is now set up for your Drupal website. It will start tracking visitor data and providing you with valuable insights into your website's performance.

How to exclude specific user IP addresses from being tracked by Google Analytics in Drupal?

To exclude specific user IP addresses from being tracked by Google Analytics in Drupal, you can use the Google Analytics module and create a custom code snippet. Here are the steps:

  1. Install and enable the Google Analytics module in Drupal.
  2. Go to Configuration > System > Google Analytics (admin/config/system/google-analytics) in your Drupal admin panel.
  3. Paste the following code into the "Code Snippet" field: