How to configure Google analytics and google search console in Drupal
Here we are going to discuss how to configure google analytics and google search console within your Drupal 8or Drupal 9 website.
Google analytics is a popular web analytics service offered by Google that tracks and reports website traffic. You ca track traffic to your website with different parameters.
Download and install google analytics module.
https://www.drupal.org/project/google_analytics
Before coming to Drupal configuration we need to set analytics account in Google.
Follow below steps for configuring google analytics.
Step 1 – Configure Google analytics
Click on start measuring.
Provide property name , since we are only tracking website, click on show advanced options.
Select Create Universal Analytics property.
Select small option
Select check box and click on Agree button
Click on save.
Step 2- Drupal configurations
Login to Drupal admin.
Navigate to Configuration -> System
Click on Google Analytics.
We need fill WEB property ID.
This you can get it from below property settings in Google analytics property settings.
Put this in Drupal configuration page and save it.
Go to left panel in analytics ,Realtime -> Overview , you can see 1 user, as you are already opened the site.
Add website in to web master tools(search console)
Google Search Console is a web service by Google which allows webmasters to check indexing status and optimize visibility of their websites .
Step 1 – Go to search console https://search.google.com/search-console
Provide your domain, this will ask for verification screen,
in my case verification was done by godaddy and I got below message,
There is Metatag Verification module in metatag contributed module, we can also use this.
after verification you can see below console.
after verification you can see below console.