---
title: Using Google analytics
related:
  - https://docs.kentico.com/k8/on-line-marketing-features/web-analytics.md
  - https://docs.kentico.com/k8/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Kentico allows you to use Google analytics as an alternative way of measuring and analyzing the key metrics of your website. This is done by placing the Google analytics [web part](https://docs.kentico.com/k8/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md) onto your website.

## Setting up a Google analytics account

To be able to configure the Google analytic web part, you need to have an existing Google analytics account set up for the website that you want to monitor.

On the [Google analytics website](http://www.google.com/analytics), you can either **Sign in** to your existing account or **Create an account** if you don't have one already.

### Signing in using an existing account

If you sign in using an existing Google analytics account, a page listing your currently tracked websites opens. Click **Admin** in the top bar of the page to access **Account administration**.

Use the **Account**  drop-down list to create a new account.

### Creating an account

1. Fill in the information about the website you want Google analytics to track:
   1. **Account Name -** the name under which you want your website to be listed in Google analytics.
   2. **Website's URL -** the URL used to access the website you want tracked by Google analytics.
2. Click **Get Tracking ID.**
3. Accept the **Google Analytics Terms of Service Agreement**.
4. On the next page, note down the **Tracking ID**,which you will use to configure the Google analytics web part in Kentico.

## Using the Google analytics web part

Now that your Google analytics account is ready and you have your **Tracking ID**,place the Google analytics [web part](https://docs.kentico.com/k8/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md) onto your website.

1. Open the **Pages** application.
2. Select the root of your site in the content tree.
3. Open the **Design** tab.
4. [Place](https://docs.kentico.com/k8/developing-websites/developing-websites-using-the-portal-engine/using-and-configuring-web-parts.md) the **Google analytics** web part onto the page.
   - We recommend placing the web part to a web part zone that is inherited by all pages on your website. See also: [Inheriting portal engine page content](https://docs.kentico.com/k8/developing-websites/developing-websites-using-the-portal-engine/inheriting-portal-engine-page-content.md)
   - The Google analytics web part has no impact on the page's live site appearance.
5. In the web part's properties, enter the Tracking code that you received on the Google analytics website.

   ![Configuring the Google analytics web part](https://docs.kentico.com/docsassets/k8/using-google-analytics/inserting_tracking_ID.png "Configuring the Google analytics web part")

   > **Tip:** **Note**
   >
   > By enabling the **Use asynchronous script** property, you can have the web part use a different version of the tracking script. The script loads sooner when visitor arrives on the website. This makes it more likely that the analytics count the visit into the statistics, even when the visitor leaves the page before it is fully loaded.

   You should now see the Google analytics web part in the target web part zone.

## Checking Google analytics tracking status

1. Open the Google analytics website and navigate to **Admin**.
2. Select your **Account** and **Property** in the appropriate columns.
3. Click on **Tracking info -> Tracking code**.
4. Near the tracking ID, you should see a status. The status should change several minutes after placing the Google analytics web part in Kentico.

![Monitoring the tracking status](https://docs.kentico.com/docsassets/k8/using-google-analytics/tracking_status.png "Monitoring the tracking status")

The possible tracking statuses are:

- **Waiting for Data** -The tracking code has been detected on the homepage of your website, and the Google Analytics servers are updating your configuration before your data can be processed and appear in your reports.
- **Tracking Installed** - You’ve got the tracking code set up, and it’s collecting and sending data to your property. You can still use the other tools, like the Google Analytics Debugger, to do a more in-depth analysis or to troubleshoot your set up.
- **Unknown** - There's no data available that Google Analytics can use to tell if your tracking code is working. Check your set up to see if you can find a solution.

Leave up to 24 hours for Google analytics to aggregate the website's data and for the status to change from **Waiting for Data** to **Tracking installed**.

## Viewing Google analytics reports

Once Google analytics tracking is working correctly, you will be able to see reports of your website's visits and other statistics on the Google analytics website. Refer to the Google analytics [Help website](http://support.google.com/analytics/) for more information on the various types of reports.

![Viewing Google analytics reports](https://docs.kentico.com/docsassets/k8/using-google-analytics/viewing_reports.png "Viewing Google analytics reports")
