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) 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.
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.