S
S
SnakeSanders2018-03-02 22:02:46
Google Analytics
SnakeSanders, 2018-03-02 22:02:46

Google Analytics, how to track the click on an external link?

There is a hotel website on wordpress, it has an external booking link on another source from the Booking
menu. You need to track clicks on this link using Google Analytics
1) tried this Google Analytics Category: links Action: click Label: wubook
in scripts
$("a[ href=' https://wubook.net/wbkd/wbk/?lcode=1398667176 ']").attr(
"onClick",
"ga('send','event','outbound','click'); "
);
I get a menu like Booking
doesn't work
2) Google Analytics Documentation Category: outbound Action:click
script: $("a[href=' https://wubook.
("trackoutboundlink","(' https://wubook.net/wbkd/wbk/?lcode=1398667176 '); return false;");
menu: Booking
not working
Where is the mistake? how to set up correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-03-02
@dimonchik2013

Chrome + F12
networking + JS debugging

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question