|
; T$ z, d8 m' J2 S- }
- <html xmlns="http://www.w3.org/1999/xhtml"> `! r. o' h- \- ^$ U$ W
- <head>7 c5 K: M$ I4 _0 o9 J J
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
0 Q( o" i1 E4 B2 O! M - <title> Afilter Tracker Google 广告点击追踪演示</title>
& v4 b) [9 l* D3 S( K - <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
* v0 Z( s2 V0 i% r6 n" K - <script type="text/javascript">
+ B) l4 Q. `% M) O$ X) y - ; A1 e/ p+ m) M: `. b
- var isOverGoogleAd = false;
( Y0 P5 Q. Y1 c( w - var ad = /adsbygoogle/;5 a3 m, Z/ `% H {, x: x) y; \0 s
- ) _& y- W9 ]- E$ G5 @
- $(document).ready(function()% i/ ]1 L4 S9 e, H
- {. ~0 ?! _ E) Y; R
- $('ins').on('mouseover', function () {1 B: @; ~3 O* u
- if(ad.test($(this).attr('class'))){& `+ t) j7 o, g
- isOverGoogleAd = true;
7 L8 x( L. ?: v0 ?; J - }1 `# K, {: e: f. o, c: _& x4 g! ?% v
- });
/ ]8 ?) b$ j( c( n/ `% V. Y ` - $('ins').on('mouseout', function () {( s+ T6 s$ z+ N) Q
- if(ad.test($(this).attr('class'))){! i4 ?9 P6 b/ j P+ \5 o9 j& c i
- isOverGoogleAd = false;
0 A6 Q/ R# ]% R: ~: U( \ - }
$ H- S2 S- w2 J9 x9 G& h7 a - });
2 ^+ z4 [; N/ N - });' v" S q6 G$ Q: G& F# e
7 [7 g& R7 h3 [2 r2 A( c- $(window).blur(function(e){
/ W( i8 m6 s/ a - if(isOverGoogleAd){5 M7 L; z+ b% A8 u8 s8 ?
- //检测到点击。/ }' O5 ~# [7 a @+ E. j
- }
" a4 H; ?+ a+ E2 H - });& j/ }7 C& n7 N( ]5 N; e
- </script>9 S% h' r% l8 G& s: P- P
- </head>+ k. p; Q" a& i2 s/ g% k1 o
- <body>' \* |) I% C9 B( x7 L2 t. ]
- ' t# t6 p2 U2 r7 z" m: P3 z
- <script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>3 h" R/ R' _4 y4 V' j& o- {
- <!-- qym -->
U& s" m- ^7 A - <ins class='adsbygoogle'/ P9 X9 m; _5 Y4 ^
- style='display:inline-block;width:970px;height:90px'
* b3 L8 i( l* u8 C - data-ad-client='ca-pub-111111111111111'
$ ^+ e& g1 h7 E( c. r ? - data-ad-slot='1111111111'></ins>
1 J% b) `; g3 q& Q1 Z' P1 p: g - <script>
% C: O0 y# W* v1 r. V2 s; X1 s - (adsbygoogle = window.adsbygoogle || []).push({});4 U0 O+ V1 H" _; K7 r2 y' F3 \
- </script>. c4 }" d6 f8 t* n& X
1 c, Y2 a+ x- r% Z1 A- </body>
! u7 P+ g: ~; W - </html>
复制代码 2 s$ O2 J& \3 }/ [; o
3 B( o4 t9 D, J$ ^
Google Adsense 广告点击追踪的代码,亲测有效。
) X% Q) S# N0 M3 R' l' _1 K3 w) k0 w q) Y( ~0 \- o% _ e
配合点击追踪 对于那些买流量做adsense的 很有帮助。( ^' o5 T+ e3 S$ P% g5 W Z$ ?- e8 m
0 N9 P. f: v# k7 l
|
评分
-
查看全部评分
|