# Is it possible to use Google Analytics for Knowledge Base Articles?

**URL:** <https://community.hubspot.com/t/is-it-possible-to-use-google-analytics-for-knowledge-base-articles/19120>\
**Category:** Knowledge Base Tool\
**Created:** [February 28, 2020, 4:55pm UTC](https://community.hubspot.com/t/is-it-possible-to-use-google-analytics-for-knowledge-base-articles/19120 "2020-02-28T16:55:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcosman](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mcosman/32/49951_2.png) [@mcosman](https://community.hubspot.com/u/mcosman)\
**Post date:** [February 28, 2020, 4:55pm UTC](https://community.hubspot.com/t/is-it-possible-to-use-google-analytics-for-knowledge-base-articles/19120/1 "2020-02-28T16:55:11Z")

</div>

We are publishing a public KB site and we would like to track the usage using Google Analytics. Is it possible to store the tracking code of Google into the KB site?

We already doing this for our landing pages but i can not find an option for this for our KB site.

Thanks in advance!

Michel.

---

<div class="post-metadata">

**Author:** ![Nynke\_HM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/nynke_hm/32/64233_2.png) [@Nynke\_HM](https://community.hubspot.com/u/Nynke_HM)\
**Post date:** [March 2, 2020, 2:03pm UTC](https://community.hubspot.com/t/is-it-possible-to-use-google-analytics-for-knowledge-base-articles/19120/2 "2020-03-02T14:03:54Z")

</div>

Hi @mcosman ,

Just as your landing pages, your knowledge base is hosted on a subdomain - when published. You can add the GA tracking code to that domain if you’d like to. Just follow these steps:

1. Go to Settings --\> Website --\> Pages
2. Select the subdomain your knowledge base is hosted on (you can find this at Domains & URLs).
3. Add the tracking code to the site footer html.

Hope this helps!

Kind regards,

Nynke

---

<div class="post-metadata">

**Author:** ![mcosman](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mcosman/32/49951_2.png) [@mcosman](https://community.hubspot.com/u/mcosman)\
**Post date:** [March 3, 2020, 8:02am UTC](https://community.hubspot.com/t/is-it-possible-to-use-google-analytics-for-knowledge-base-articles/19120/3 "2020-03-03T08:02:00Z")

</div>

So simple .. yet so useful

Thanks!!

Michel.

---

<div class="post-metadata">

**Author:** ![VRakitski](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@VRakitski](https://community.hubspot.com/u/VRakitski)\
**Post date:** [December 8, 2022, 2:01pm UTC](https://community.hubspot.com/t/is-it-possible-to-use-google-analytics-for-knowledge-base-articles/19120/4 "2022-12-08T14:01:26Z")

</div>

Hi  
I spent most of day, and lost part of the day’s salary, before understand why it doesn’t work.

There is a banner on Settings --\> Website --\> Pages which says.

![VRakitski_0-1670507685640.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/d/1d3454308859f95ef0042700cf02a2d647b7afbc.png)

Best,  
Vlad

---

<div class="post-metadata">

**Author:** ![MiaSrebrnjak](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miasrebrnjak/32/10_2.png) [@MiaSrebrnjak](https://community.hubspot.com/u/MiaSrebrnjak)\
**Post date:** [December 9, 2022, 5:18pm UTC](https://community.hubspot.com/t/is-it-possible-to-use-google-analytics-for-knowledge-base-articles/19120/5 "2022-12-09T17:18:23Z")

</div>

Hi @VRakitski,

Thank you for reaching out! Were you able to solve this in the end?

You’d need to add the GTM in settings \> _Website \> Pages \> Integrations_ as described above & [in this Knowledge base article.](https://knowledge.hubspot.com/website-pages/add-the-google-tag-manager-code-to-your-pages#:~:text=you%20can%20integrate%20google%20tag%20manager%20with%20hubspot%20to%20track%20your%20hubspot-hosted%20landing%20pages%2C%20website%20pages%2C%20blog%2C%20and%20knowledge%20base%20in%20google%20tag%20manager.)

Cheers  
Mia, Community team
