After enabling the module, navigate to admin – configuration – Google Analytics. Here, you will see all the settings for the module. This is also where you will paste the tracking ID you got from the last step. Paste the tracking code under the Web Property ID and you’ll be all set to start tracking your site.
How do I add Google Analytics code to Drupal?
How To Add Google Analytics On Drupal 8 Using A Module
- Login to Google Analytics.
- Add Your Drupal Website.
- Log in to your Drupal website’s admin panel.
- Install Google Analytics Module.
- Get Tracking ID for your website.
- Configure the Module.
- Test it thoroughly!
How do I add a tracking code to Drupal?
Currently there are three possible regions to inject your tracking code snippets: Inside <HEAD> – Code is added using drupal_add_html_head () After <BODY> – Code is added to $page[‘page_top’] using hook_page_alter() Before </BODY> – Code is added to $page[‘content_bottom’] using hook_page_alter()
Where do I put Google Analytics code on my website?
The Google Analytics tag should be added near the top of the <head> tag and before any other script or CSS tags, and add the property ID of the Google Analytics property you wish to work with.
How do I use Google Analytics in Drupal 8?
How can I integrate Google Analytics with Drupal 8 website?
- Create an account in Google Analytics.
- Login to your Drupal 8 site using the admin credentials.
- Download and install Google Analytics module.
- Go back to the tab with your Google Analytics account and copy your tracking ID.
How do I add Google Analytics code to HTML?
Set Up Google Analytics
- Sign in or create a Google Analytics account.
- In the left bottom of the sidebar, click Admin.
- On the right side of the screen, select the account you would like to use or create a new account by clicking the + Create Account button.
- Click the + Create Property button.
- Select Website.
Where do I put Google Analytics code in WordPress?
Log in to your WordPress dashboard and navigate to Appearance » Theme Editor. Now click the Theme Header (header. php) file on the right-hand side below the Theme Files section. Paste the tracking code you just copied from your Analytics profile before the closing </head> tag.