> For the complete documentation index, see [llms.txt](https://docs.statuspal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.statuspal.io/platform/integrations/google-analytics.md).

# Google Analytics

### Obtain Google Tag ID from Google Analytics

1. In your Google Analytics dashboard, click on **Admin**
2. Click on **Data Collection and modification**
3. Click on **Data streams**
4. Click on your Web data stream
5. Click on **View tag instructions**
6. Click on **Install manually**
7. You can find your Google Tag ID at `gtag('config', 'G-123');` (in this example, the Google Tag ID would be 'G-123').
8. Copy your Google Tag ID and save it for the next step.

### Configure Google Analytics on your StatusPal status page

{% hint style="info" %}
Visit your StatusPal status page settings by clicking on <mark style="background-color:green;">Status page</mark> from the sidebar of your admin dashboard.
{% endhint %}

Once in your status page settings page, scroll down to find the **Custom Javascript** text field.

Enter the following Javascript code snipped, making sure to replace the value of the `GTAG_ID` variable ('G-123') with the value you copied from the previous step.

{% code fullWidth="false" %}

```javascript
var GTAG_ID = 'G-123'; // Replace the 'G-123' with your own value
var gtagScript = document.createElement('script');
gtagScript.async = true;
gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id='+GTAG_ID;
document.head.appendChild(gtagScript);

window.dataLayer = window.dataLayer || [];
function gtag() {dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', GTAG_ID);
```

{% endcode %}

Click on the Update button at the bottom, and your Google Analytics integration should start working on your StatusPal status page.
