跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 追踪Google Adsense点击的代码
未分類
2 8 月 2018

追踪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

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具