|
|
; o8 a4 k7 K; j+ E* i: I
- <html xmlns="http://www.w3.org/1999/xhtml">/ i1 u' L& Z7 n7 M+ ?
- <head>
4 ]9 r+ S4 r" S5 G# U - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />; p/ W& T; S4 g2 W' T0 n' @) @9 O
- <title> Afilter Tracker Google 广告点击追踪演示</title>
k `9 F- ^6 N$ a6 Z4 E! R) U - <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
5 O. @. W, C$ _& O3 J( h - <script type="text/javascript">
! T3 A0 ~, p% |/ X/ Z1 k# ]; R3 A
2 I3 i" k. n u+ [7 f& J! h/ L- var isOverGoogleAd = false;' f, K( a% g1 z$ C3 C
- var ad = /adsbygoogle/;
% {! {; ^% r5 e6 C5 T - 8 |3 q; N0 b; J" l% H0 z
- $(document).ready(function()
% d# _( J* Z4 J. d' u0 }2 { - {
& L& }. }& e6 b) O2 i. V - $('ins').on('mouseover', function () {/ }0 |( Z* H: f+ a1 f; x3 L) h
- if(ad.test($(this).attr('class'))){
2 u# E, B" S, g& f- e8 k - isOverGoogleAd = true;
: n0 B0 g, ~0 o% l: U - }
& [- w6 V; e' X4 B% k6 X9 F, [( @ - });3 k" Z# v% h) i
- $('ins').on('mouseout', function () {$ C! v3 R$ z) ~: _3 D
- if(ad.test($(this).attr('class'))){2 k0 V# Q' E) R
- isOverGoogleAd = false;2 T7 e3 P- P% L, Z1 |
- }
7 w5 M1 W0 ~' X3 H - });
' W3 U/ f) m+ `4 Q- ] - });
' m; _3 y5 I+ s6 t - 2 C1 L2 a4 U! x S& d) g
- $(window).blur(function(e){( @0 N; h5 l4 A6 L1 I
- if(isOverGoogleAd){( H3 j7 C2 h6 ?" Y5 L
- //检测到点击。
) c* z8 ~1 o* T9 L& [ - }( k0 S8 ~! A% K& V* C& c5 Z
- });
' k* |6 n: g j" _! ] - </script>) J2 s. t5 @$ `% m$ K
- </head>& c% @( t e" Q( [% Y T3 T
- <body>
4 c5 G/ i; Q" X! O - b1 ^: R8 k3 W- y* w* X, y, K, ]
- <script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>7 P# c1 D+ }3 k% w6 Q" T
- <!-- qym -->. v& L' k% w2 I1 ^' O$ J
- <ins class='adsbygoogle'
5 m4 r% S0 r: ^+ M- [ ? - style='display:inline-block;width:970px;height:90px'; |& i+ J0 V3 _
- data-ad-client='ca-pub-111111111111111'
G9 S7 \8 `& i B - data-ad-slot='1111111111'></ins>
$ Q+ E0 E( i8 h# f8 G3 C1 E - <script>1 }" ?# v- p7 W
- (adsbygoogle = window.adsbygoogle || []).push({});1 [/ o2 L4 s+ s V/ F% m# F1 C, n$ D
- </script>6 i$ P3 y' E/ P, J
- ; d4 b ?- B; r, \: m' q
- </body>
- R" s6 C3 D+ g/ D- r - </html>
复制代码 9 S! H8 v' E; O( l
0 W8 f+ p. y' T9 _$ H! `" m
Google Adsense 广告点击追踪的代码,亲测有效。
: ]# B' Q: @ [% Y$ F; k8 h
0 B, C" ^1 h. l: X配合点击追踪 对于那些买流量做adsense的 很有帮助。
: y# V3 W W$ l' i1 P2 N/ ^, G
2 _2 `/ B9 o+ n% }% k' @. x, z |
评分
-
查看全部评分
|