Google Analytics is a service offered by google which is mainly used to analyze the traffic of drupal/non drupal websites. This module gives statistical information such as
- number of people who viewed a drupal page.
- average time visitors stayed on a drupal website.
- average number of pages viewed per visit etc.
Thus, to watch over the statistical growth of a website, this module is a must. To ensure the working, the module must be tested after configuring it with the drupal/non-drupal site. Here I have documented on how to test a Google Analytics module configured on a website.
Test cases/ Checklists against Google Analytics module
- Open the pages you want to check Google Analytics
- Take the source code by pressing Ctrl + u
- Search Google Analytics by pressing Ctrl + f
- Enter 'googleanlaytics' in the search form
- Verify whether the Google Analytics details is displayed in the source code.
For example; if Google Analytics is enabled you will see the following code
We can test this as both anonymous and logged in user.
For admin users, follow the steps below:
- Login as admin into the site.
- Click on 'Modules' dispayed in the admin menu bar
- Enter 'Modules' page and Search google analytics by pressing Ctrl + f
- Enter google anlaytics in the search form
- Verify whether the google analytics module is enabled for the site.
If the developers give the credentials of google analytics account, then we can simply check the traffic of our site. For that,
- Open the site http://www.google.co.in/analytics/
- Login to the site by using the credentials of google analytics account
- Enter the home page and check the traffic of our site
From this page the number of Visits, Unique Visitors, Average Visit Duration, Bounce Rate, % of New Visits etc can be viewed. These ways help a user to check Google Analytics on a site.