Posted by Bradley Kelly on

Hi Joe,
Thank you. I was having a look at the documentation https://www.goatcounter.com/help/events on the GoatCounter website about creating campaigns through 'onclick', however I think I'm looking on the wrong part of the website that you showed on the last Voice Group Meeting, or I'm too sure how it works. If I'm thinking correctly, the code that you showed me, will it hide the UTM tags from the URL? As I didnt think before that the method I'm using, when you click on a page from the Media Hub to open a page in the iFrame, it will change the URL to include the UTM tags for example; https://www.suttonmencap.org.uk/mediahub/#skiptoContent?utm_campaign=Breakaways+Theatre+Trip&utm_source=MediaHub), but then if the person copies the URL to share, It will still have the UTM tags in the URL, but it won't load that page in the iFrame, so therefore, the wrong campaign will be tracked. 

Posted by Bradley Kelly on

Hi Joe. I've added data-goatcounter-click to all the podcasts links on the Media Hub like this;

href="https://www.suttonmencap.org.uk/mediahubcontent/assets/documents/podcast-01-employment-podcas"  data-goatcounter-click="https://www.suttonmencap.org.uk/mediahub/podcasts/employment#skiptoContent?utm_campaign=Podcasts+Employment+Podcast+with+Gemma+Yaz+and+Leonard+MediaHub&utm_source=MediaHub"

Is that the correct code to add?