6 j. X3 S" A9 z) {$ n- t3 n
<html xmlns="http://www.w3.org/1999/xhtml">
6 m" u0 ^. Y6 o1 s0 e* a* t <head>0 m. O" \4 i8 E. u @5 A
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
0 @9 O0 k2 w3 {7 d <title> Afilter Tracker Google 广告点击追踪演示</title>) A u- ~" b9 G6 D" F2 y9 D7 h0 C) _" s
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
" j) ^6 F7 T# N4 t+ o <script type="text/javascript">3 W6 b6 l0 e- N+ `
! A* C- T7 ?4 K
var isOverGoogleAd = false;8 J% \/ ]) M5 K# D" R% i
var ad = /adsbygoogle/;
/ X+ d& g5 }* F1 S( O) P
" h2 {% l; f- j: { $(document).ready(function()
- T& w0 I( }3 ? ]1 C M1 L1 f {
/ E7 J# }) v' F0 P; q% i $('ins').on('mouseover', function () {
) c& x) E: @* V$ h if(ad.test($(this).attr('class'))){- T. X: B. [) A, `1 R) X
isOverGoogleAd = true;
0 l6 {5 A) [: f/ u7 ]0 g" | }
3 r* `% M; h, e9 w# ` });9 G& r# L0 T3 D: Q# P2 L
$('ins').on('mouseout', function () {4 W$ E2 X7 M/ |$ f. X; [- d
if(ad.test($(this).attr('class'))){
9 N3 B: l$ ^6 F7 @9 i# A isOverGoogleAd = false;
% L7 a) R- ] V/ l }
# ]' O* B# s2 D5 I% X) a# m });: W/ O, u' e& ]3 L
});
) A3 ~" x# l l' Y5 _+ Z
3 _- ] K E! }' U3 O8 e$ o* T $(window).blur(function(e){
1 q$ B k3 V! c3 G* z if(isOverGoogleAd){4 x. A& \1 O& D5 O1 ~4 y% `- S
//检测到点击。$ r2 Y; `3 C, o( _ _4 r2 }5 I# j, L
}. F# N6 o. {. z5 b Q
});% _* D, U" N( ~6 J
</script>
3 r/ V4 }. V: {. e+ c0 H </head>
& d; Y# T( G H( h& o <body>
7 n. V/ g8 v$ `" h2 L) a2 y
6 M3 ?4 Y$ g; X9 B+ [& J <script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>
" w* F& j' r) c% a- E( x& m <!-- qym -->4 Q0 X5 t/ p% m
<ins class='adsbygoogle'
2 m7 d4 d- l+ w7 C6 L. K/ g style='display:inline-block;width:970px;height:90px'
( G0 ~9 E7 t& K" I9 [9 } data-ad-client='ca-pub-111111111111111'
( B |! ~ G* I: g data-ad-slot='1111111111'></ins>
7 f# i* m. r: [( ]* S( G <script>! C* u: {7 w. |$ v- G" Z
(adsbygoogle = window.adsbygoogle || []).push({});0 `' }$ m, M {5 E7 ~
</script> w& Z6 m" z( O: O) k
/ W3 }; C" ?) [5 Z& E </body>
# }7 C+ y6 r4 V* n </html> 复制代码
" }# o1 O: w! L" ? 5 x3 B2 A5 j' N: D3 c0 ]
Google Adsense 广告点击追踪的代码,亲测有效。1 j. h* @' Z9 e+ V: d4 x( e5 b
$ K; A" o8 _# O& q0 W7 m
配合点击追踪 对于那些买流量做adsense的 很有帮助。
2 }6 n8 |# Q" [9 L& X& n. O% f! x9 E 0 X# ^2 @6 P' v' |) S$ R
评分
查看全部评分
相关帖子