Tracking click on an "href" image as a goal in Google Analytics

439 Views Asked by At

thanks in advance for the help,

I have this code on my page:

a href="https://eshops.mercadolibre.com.mx/XXX" target="_blank" onclick="__ga('send', 'event', 'button', 'click', ‘URL’);">
Mercadolibre

But I cant see the results reflected on Google analytics, I created a goal called "ClickOnLink" with details as follow:

Details

What am I doing wrong?

1

There are 1 best solutions below

0
On

Your goal configuration specifies a value greater than 0, but the event your onclick is sending does not have a value associated with it. Either you send a value greater than 0, or you remove the value condition in your goal.

Make sure you have the same letter casing as well.