neil
(Neil Lalonde)
14 يوليو 2016، 6:29م
21
I think I have it working in a branch:
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.
4 إعجابات
neil
(Neil Lalonde)
14 يوليو 2016، 9:45م
22
Everything seems to be working. I wrote up a howto, so tag manager experts please review.
This topic will show you how to setup Google Tag Manager and send data to Google Analytics. After you’re done, the Google Tag Manager API will be running on your Discourse site, so you could in theory send arbitrary events to any service that integrates with Tag Manager. Analytics is only the beginning.
This guide covers setting up Google Tag Manager, if you only want to enable Google Analytics for your site, simply set the G-Tag in the ga universal tracking code site set…
7 إعجابات
polusok
(Mykhailo Poliarush)
14 يوليو 2016، 10:20م
23
awesome, I need to update to latest version to try, it will take a bit and then I will check
polusok
(Mykhailo Poliarush)
14 يوليو 2016، 10:48م
24
Did everything as per instructions, working like a charm! Thank you very much!
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.
7 إعجابات
This topic was automatically closed after 3095 days. New replies are no longer allowed.