mirror of
https://github.com/moonlight-stream/moonlight-stream.github.io.git
synced 2026-05-19 08:10:15 +00:00
Add external link tracking
This commit is contained in:
@@ -247,6 +247,11 @@
|
|||||||
ga('create', 'UA-47339221-1', 'auto');
|
ga('create', 'UA-47339221-1', 'auto');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
|
||||||
|
!function(t){"use strict";var e=window.location.host;t("body").on("click",function(n){
|
||||||
|
function o(){document.location=a}if(!n.isDefaultPrevented()&&"function"==typeof ga){
|
||||||
|
var i=t(n.target).closest("a");if(1==i.length&&e!=i[0].host){n.preventDefault();
|
||||||
|
var a=i[0].href;ga("send",{hitType:"event",eventCategory:"outbound",eventAction:"link",
|
||||||
|
eventLabel:a,hitCallback:o}),setTimeout(o,1e3)}}})}(jQuery);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user