---
title: "Statistics setup"
date: "2025-01-10T14:18:30+00:00"
summary: "Learn how to set up and use Statistics for website analytics, including cookieless tracking and IP exclusion."
image:
type: "page"
url: "/web-governance/statistics-setup"
id: "e136f258-73fa-4566-8360-b80c311fa3c9"
---

Introduction
------------

This article provides instructions for admin users on how to set up the Statistics feature and describes the data available in the feature.

For more information, visit [Statistics versus Google Analytics](https://docs.acquia.com/acquia-optimize/features/statistics/vs-google-analytics).

Instructions
------------

This section provides instructions for admin users on how to set up and enable the _Statistics_ feature.

1.  Navigate to the _Domain Overview_ page.
2.  Click **Action** on the same row as the domain that you want to set up the Statistics module on and select **Script Setup Guide** from the expanded list of options.

The system opens the _Set up your domain_ page.

1.  Click **Enable Statistics** to turn it on.
    
    ![The location of the Enable Statistics button in the Script Setup dialog.](https://acquia.widen.net/content/67f69909-eb28-4bb1-87ca-c25940add92c/web/WebGov_ScriptSetupGuide-EnableStatistics.png)
    
2.  The options to **Enable Cookieless Tracking** and **Enable Document Tracking** appear.
3.  Turn on these if desired.  
    For more information, visit:
    *   ​[Cookieless tracking setup](/node/58866)
    *   [Document scan setup](/node/58551)
4.  Click **Save** at the bottom of the page.
5.  Copy the script and add it to the HTML code of the website. In the HTML editor, paste the script into the HEAD tag or place it before the `</body>` tag on every page.
    
    Note
    
    If Consent Manager is activated, the script must be in the HEAD tag in order to catch the cookies.
    
    For more information, visit [Add the script](https://docs.acquia.com/acquia-optimize/admin/setup/script).
    
6.  Return to the _Domain overview_  to turn on the _Statistics_ section view for the dashboard.
7.  Click **Actio**n on the same row as the domain and select **Edit Domain** from the expanded list of options.
    
    The system opens the _Edit domain_ page.
    
8.  In the _Features_ section, click **Statistics** to turn it on.
    
    ![The Features section on the Edit Domain page. The fields are described in the document text.](https://acquia.widen.net/content/a89364df-f6f3-4e11-93d0-7e06107b7773/web/WebGov_EditDomain-FeaturesSection.png)
    
9.  Click **Save**. The _Edit Domain_ page closes.

### Advanced setup

It is possible to set up the script manually without using the wizard. The button must be **ON** in the _Script Setup Guide_ as per the steps above, but if you prefer to set up the script yourself, visit [Tracking](/node/58046) in the developers documentation section.

Exclude IP addresses
--------------------

This section provides instructions for admin users on how to exclude a specific IP address from the statistics results in the scan.

Note

Excluded IP address statistics can only affect the results seen by new visitors.

1.  Navigate to the _Domain Overview_ page.
2.  Click **Action** on the same row as the domain and select **Statistics excluded IP addresses**. 
    
    The _Excluded IP addresses from statistics_ page opens. This page lists previously added IP address exclusions and offers the opportunity to add or delete exclusions from the list.
    
3.  Click the plus icon to add a new IP address for exclusion from the scan.
    
    ![The location of the Add a new Exclusion button under the blank fields in the "Excluded IP Addresses from Statistics" page.](https://acquia.widen.net/content/ba958a64-4d97-49bd-bc16-9f35641dcd24/web/Mon_AdminSettings-Action-Statistics-ExcludedIPAddressesFromStatistics-AddNewButton.png)
    
    _Tip_! Use \* as a wildcard (for example 192.168.1.\*).
    
4.  Click the trashcan icon to remove an existing exclusion from the list.
5.  Click **Save and close** to save the changes and close the page.

Cookieless tracking
-------------------

This section provides information about Cookieless tracking.

The Statistics module normally applies a cookie to the browser of the visitor. It is possible to remove this so that the scan can still track the same data from visitors who refuse Statistics cookies on the cookie banner.

*   For instructions on how to turn this on, visit [Cookieless tracking setup](/node/58866).
*   To set up Cookieless Tracking manually, visit [Tracking](/node/58046) in the developers documentation section.

Event tracking
--------------

For instructions on how to use and set up Event Tracking, visit [Event tracking](/node/58726)

Copy the script
---------------

When all of the features and modules are set up, copy the script and add it to the HTML code of the website. In the HTML editor, paste the script into the HEAD tag or place it before the </body> tag on every page.

Note

If Consent Manager is activated, the script must be in the HEAD tag in order to catch the cookies.

For more information, visit ​[How to add the script](/node/60216).