Is it possible to record an event or goal based on a specific Outbound Link Click url?
For example - client has an external booking system - would be nice to track events without having to add a class to every link and button scattered around the site.
Sure! You can add a simple JS snippet to track them. A bit like this:
Or maybe like this:
In principle, you can use document.querySelectorAll to find the links to track, attach a click event listener, and track the clicks using the “pirsch(…)” event function.
Please let me know if you need help setting it up. I need an example from your actual page in that case
Events are tracked as they come in. They do not need to be defined in advance, so what you’re trying to do is already possible. Goals can be set up on events, including a meta key and value.
The Outbound Link Click event (which we create by default if you use our snippet) tracks the clicked URL via a meta data field. You should be able to use that to create a conversion goal that tracks specific external link clicks using that.