# How to send custom dimensions to the Google analytics?

**URL:** https://meta.discourse.org/t/how-to-send-custom-dimensions-to-the-google-analytics/176662
**Category:** Development
**Created:** [January 20, 2021, 7:28am UTC](https://meta.discourse.org/t/how-to-send-custom-dimensions-to-the-google-analytics/176662 "2021-01-20T07:28:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Saurabh\_Khandelwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saurabh_khandelwal/32/156332_2.png) [@Saurabh\_Khandelwal](https://meta.discourse.org/u/Saurabh_Khandelwal)
#### Post date: [January 20, 2021, 7:28am UTC](https://meta.discourse.org/t/how-to-send-custom-dimensions-to-the-google-analytics/176662/1 "2021-01-20T07:28:08Z")

</div>

Hi All,

As I know we can set-up Google Analytics by configuring **gtm** and **ga universal tracking code** from the Admin → Settings. But what if I want to send the current Topic tags to Google Analytics as custom dimensions.

Lates say currently I’m trying to visit the Topic **“Test Topic”** (URL: [https://discourse.demo.com/t/test-topic](https://discourse.demo.com/t/test-topic)) having a tag: **“test-tag”**.  
Now when I load the Topic page I want to send this Tag to Google Analytics as a custom dimension.

Example script:

```
ga('set', 'custom-dimension-key', 'test-tag');
ga('send', 'pageview');

```

So how I can do this using the Theme component.

Please provide me the solution.

Thanks ,  
Saurabh Khandelwal
