Track outbound links – no custom html strings

Hi!

I want to track traffic from our website to our LinkedIn page. I’ve set up a goal in Google Analytics to track links according to this structure: <a href=“X, the moonshot factory | LinkedIn” onclick="ga(‘send’, ‘event’, ‘social’, ‘referral’, ‘LinkedIn’);”>

The problem is that our website builder does not allow me to add my own html. I can only add clean url:s. So using UTM-tags at the end of url:s works fine, but adding a full a href-string does not work.

Does anyone know how to convert this html-string ot a regular link? Is it possible?
<a href=“X, the moonshot factory | LinkedIn” onclick="ga(‘send’, ‘event’, ‘social’, ‘referral’, ‘LinkedIn’);”>

Hi @Maja! I’d recommend reaching out to a developer about this. :slight_smile:

1 Like

If anyone follows this thread, I solved it another way. Instead of setting up a goal in Analytics I set up an event in Google Tag Manager. So when someone clicks an outgoing link on our website that contain “linkedIn” in the url, an event will be registered in Analytics. Easy as pie :slight_smile:

5 Likes

thanks for the awesome information.

2 Likes