How to add google analytics code to drupal 7?

by jacey.lubowitz , in category: SEO Tools , 7 months ago

How to add google analytics code to drupal 7?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

Member

by jamison , 7 months ago

@jacey.lubowitz 

To add Google Analytics code to Drupal 7, you can follow these steps:

  1. Sign in to your Google Analytics account or create a new one if you don't have one already.
  2. Once logged in, select the Admin tab at the bottom left corner of the page.
  3. In the Account column, click on the dropdown menu and select the account you want to track with Drupal.
  4. In the Property column, click on the dropdown menu and select the website or app you want to track.
  5. Under the Property column, click on Tracking Info > Tracking Code.
  6. Copy the tracking code that appears in the text box.
  7. Log in to your Drupal 7 site as an administrator.
  8. Go to the Modules section of the site by navigating to Administration > Modules.
  9. Look for the "Google Analytics" module in the list and enable it by checking the box next to it.
  10. Once enabled, click on the Configure link next to the module.
  11. In the "Web Property ID" field, paste the tracking code you copied from Google Analytics.
  12. Scroll down and click on the "Save configuration" button to save the changes.
  13. Clear the site cache by navigating to Configuration > Development > Performance and clicking on the "Clear all caches" button.
  14. After clearing the cache, your Drupal 7 site will now have Google Analytics tracking enabled.


Please note that the steps may vary slightly depending on the version of Drupal 7 and the theme you are using.