|
|
* P: H2 H. h3 `$ f+ N9 D/ t- c
- <html xmlns="http://www.w3.org/1999/xhtml">
4 {8 p2 y8 C+ D - <head>( f! [! P6 q5 N
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 w! r' F; ^8 ?$ q4 p; I5 W7 f - <title> Afilter Tracker Google 广告点击追踪演示</title>
3 N5 i5 W" j3 F - <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
% q% y' l# V6 O3 j - <script type="text/javascript">
9 X7 O$ _- x5 ^2 e- G8 y7 `/ \3 M
0 n' I: J- a( Q7 ], U- var isOverGoogleAd = false;
4 d8 I& p4 `5 n) l+ @ - var ad = /adsbygoogle/;
% a! u- B. V v
5 b* c: |( [" _- $(document).ready(function()
- B$ ]+ k% |9 p4 v* E9 k6 C! z - {3 A& F0 r4 C1 n& s* m; L
- $('ins').on('mouseover', function () {
& _( c$ u& `* _, E4 d - if(ad.test($(this).attr('class'))){
. Z/ ? G8 o) j - isOverGoogleAd = true;$ J3 i5 |/ E$ C4 }( H: S3 l' A @
- }* k6 a* {( F- `4 Q/ f* C W" r2 Y
- });/ }; |2 j( l3 z& U) x' E
- $('ins').on('mouseout', function () {, z7 N# `1 g) I. I* C3 R1 r) S! F
- if(ad.test($(this).attr('class'))){
( ~5 N( s2 A/ l( m8 K - isOverGoogleAd = false;" g3 g0 Q" l+ f0 X
- }
7 S$ _* D f2 ?- ~ - });
2 N M/ V* D. @6 h0 z - });
% N8 p$ J) C* z
2 ?0 {% h* N1 F8 S9 L- $(window).blur(function(e){
! ^" v, h0 S& R# [+ B" C4 l- u' Q& C+ v - if(isOverGoogleAd){7 q8 l5 Q3 {8 y* P, g
- //检测到点击。
) W' j# X% Z9 s" J8 O+ Q - }% S/ H- |9 F( [! F( ?6 E! [" Q
- });- z/ @ N6 R5 c* Q- G
- </script>2 z% }; X! M+ K
- </head>' z' G0 I' r2 t# L9 i% ?
- <body>) F9 p! w/ f1 ~3 r
3 O$ n; u; W. A0 [4 n- <script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>
% w# U# x% A7 l1 a% h. [7 o - <!-- qym -->8 V- ?0 O. m* n/ k3 C
- <ins class='adsbygoogle'
! n0 S6 J: S& ?3 N5 c4 f - style='display:inline-block;width:970px;height:90px'6 G! A; ^- p i; N
- data-ad-client='ca-pub-111111111111111'4 V, v6 d I5 b% L
- data-ad-slot='1111111111'></ins>
r b R5 F+ r0 t7 { - <script>" ~+ v3 P2 H8 ~
- (adsbygoogle = window.adsbygoogle || []).push({});4 A- w: \( }; p' j
- </script>
% O+ i4 \* z0 B/ b - 9 E6 i* G' B a, P( c$ }1 J8 V
- </body>+ F8 c& F: o7 f8 J$ y' _7 u
- </html>
复制代码
% ]9 t' W F* ^, ?9 F( c+ E, H8 K, h& l( w' P
Google Adsense 广告点击追踪的代码,亲测有效。- m7 d6 l( |, [( A
0 s9 w/ G! Q9 l/ U3 _9 ~配合点击追踪 对于那些买流量做adsense的 很有帮助。* S R8 I/ \: U8 ]
! o6 w( H, E' C' o
|
评分
-
查看全部评分
|