I’ve been wrestling with this one and I’m having a bit of an issue. I’ve finally linked up google analytics so that the ‘onClick’ trigger (replaced by a ga-track line) shows the interaction, but I’m looking to show the URL of an outbound link within that interaction on GA.
The initial solution to get the event to show was found here:
which was extremely helpful. The code shows certain perimeters that look like the could be altered to call for the link’s url, but I’ve had no luck.
The reason I’m doing this is because I have a series of randomized ads that need to be tracked when the ‘visit our sponsors’ button is clicked. They’re set up via the CMS, so the address is different depending on which ad pops up.
Any help in figuring out how to display the URL in the Event Catagory section of GA would amazing.
I’m not very code savvy, I can somewhat understand what I’m looking at but have had no luck in bashing with other code that would display the URL.