0°

追踪Google Adsense点击的代码

Google Adsense 广告点击追踪的代码,亲测有效。

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>& m4 {) ^6 B i
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />$ A. L% `: q6 y4 l9 h
<title> Afilter Tracker Google 广告点击追踪演示</title>
<script src=”https://code.jquery.com/jquery-3.3.1.min.js”></script>’ N8 _’ {7 j, U4 T1 o. J1 P
<script type=”text/javascript”>

var isOverGoogleAd = false;
var ad = /adsbygoogle/;

$(document).ready(function()7 a8 o+ Y& e$ _, s
{
$(‘ins’).on(‘mouseover’, function () {” D! [4 _$ Y8 h3 `’ e
if(ad.test($(this).attr(‘class’))){6 g, }. v6 Z5 r O* c) O1 \
isOverGoogleAd = true;
}
});9 v” I; v% ` K; _! N0 U# G, K
$(‘ins’).on(‘mouseout’, function () {
if(ad.test($(this).attr(‘class’))){
isOverGoogleAd = false;
}
});
});
( Q’ S6 e5 d5 G
$(window).blur(function(e){
if(isOverGoogleAd){
//检测到点击。- R- Y, }! }5 L: _: ^
}5 _! f1 |) f4 \
});, P’ D! V- t* J$ g
</script>: ~6 e” W& l b” C4 U& i$ k9 r
</head>
<body>

<script async src=’//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js’></script>
<!– qym –>
<ins class=’adsbygoogle’5 _, T2 \; A) V
style=’display:inline-block;width:970px;height:90px” l) K) m’ I! ]0 a6 \, `; l0 t0 g9 p
data-ad-client=’ca-pub-111111111111111’7 t# o’ _! x- S1 b% o
data-ad-slot=’1111111111′></ins>5 x3 o% C. ~- Q. _
<script>
(adsbygoogle = window.adsbygoogle || []).push({});” ?; z+ L3 k. O
</script>
” D) {6 F* C0 M9 i9 H9 ~
</body>
</html>

credit:adzon

「点点赞赏,手留余香」

    还没有人赞赏,快来当第一个赞赏的人吧!
0 条回复 A 作者 M 管理员
    所有的伟大,都源于一个勇敢的开始!
欢迎您,新朋友,感谢参与互动!欢迎您 {{author}},您在本站有{{commentsCount}}条评论