# Implementierung von Google Tag Manager mit Discourse

**URL:** https://meta.discourse.org/t/implementing-google-tag-manager-with-discourse/36861
**Category:** Data & reporting
**Created:** [17. Dezember 2015 um 23:23 UTC](https://meta.discourse.org/t/implementing-google-tag-manager-with-discourse/36861 "2015-12-17T23:23:09Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [14. Juli 2016 um 18:29 UTC](https://meta.discourse.org/t/implementing-google-tag-manager-with-discourse/36861/21 "2016-07-14T18:29:50Z")

</div>

I think I have it working in a branch:

[https://github.com/discourse/discourse/commit/8074d3bed9c4cfaee71e0ac88e4e614e0a59c14f](https://github.com/discourse/discourse/commit/8074d3bed9c4cfaee71e0ac88e4e614e0a59c14f)

The tricky part is setting up GTM to pass along the events to UA. UA is getting the page views, but they’re all at the root url. I’ve defined our own events (`page.title` and `page.url`), but GTM also has an automatic history listener (not sure it includes page title, so we might want to keep the custom events). Either way, I don’t have the GTM setup correct yet. I’ll keep playing around in the baffling GTM interface.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [14. Juli 2016 um 21:45 UTC](https://meta.discourse.org/t/implementing-google-tag-manager-with-discourse/36861/22 "2016-07-14T21:45:59Z")

</div>

Everything seems to be working. I wrote up a howto, so tag manager experts please review. 😁

> [@Integrate Google Tag Manager with Google Analytics](https://meta.discourse.org/t/setup-google-tag-manager-for-analytics/47335):
>
> bookmark This guide will help you set up Google Tag Manager and use it with Google Analytics on your Discourse site. Additionally, it covers configuring variables, triggers, and tags in Google Tag Manager to track page views. information_source This guide covers setting up Google Tag Manager. If you only want to enable Google Analytics for your site, set the G-Tag in the ga universal tracking code site setting. Our settings may still refer to all analytics as universal, but this is a legac…

---

<div class="post-metadata">

### Author: ![polusok](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/polusok/32/106741_2.png) [@polusok](https://meta.discourse.org/u/polusok)
#### Post date: [14. Juli 2016 um 22:20 UTC](https://meta.discourse.org/t/implementing-google-tag-manager-with-discourse/36861/23 "2016-07-14T22:20:14Z")

</div>

awesome, I need to update to latest version to try, it will take a bit and then I will check

---

<div class="post-metadata">

### Author: ![polusok](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/polusok/32/106741_2.png) [@polusok](https://meta.discourse.org/u/polusok)
#### Post date: [14. Juli 2016 um 22:48 UTC](https://meta.discourse.org/t/implementing-google-tag-manager-with-discourse/36861/24 "2016-07-14T22:48:08Z")

</div>

Did everything as per instructions, working like a charm! Thank you very much!

 ![](https://global.discourse-cdn.com/meta/original/3X/5/4/543d35d9490d388aa9e3cbb6b99a5f1d2570f818.png)

However, need to wait 1 or 2 days to see final statistics and results. I will let you.

**UPD: Everything is fine! You can use solution.**

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [8. Juni 2024 um 12:45 UTC](https://meta.discourse.org/t/implementing-google-tag-manager-with-discourse/36861/25 "2024-06-08T12:45:22Z")

</div>

Dieses Thema wurde nach 3095 Tagen automatisch geschlossen. Neue Antworten sind nicht mehr möglich.

[Vorherige Seite](https://meta.discourse.org/t/implementing-google-tag-manager-with-discourse/36861.md?page=1)
