Google Analytics how to track the transition from an external link?

There is a hotel website on wordpress, it has an external link to booking on a different source from the menu Reservation
Need to track the clicks using Google Analytics

1)tried the Google Analytics Category: links Action:click Label:wubook
in scripts


get menu, type Reservation

does not work

2) documentation for the Google Analytics Category: outbound Action:click

script: $("a[href='']").attr
("trackoutboundlink","(''); return false;");

menu: Booking

not working
Where is the error? how to set correctly?
June 7th 19 at 14:42
1 answer
June 7th 19 at 14:44
Chrome + F12

networking + JS debugging

Find more questions by tags Google AnalyticsWordPress