|
|
( \7 C: s% p% m6 x- {
- <html xmlns="http://www.w3.org/1999/xhtml">
8 i. v. R \% V - <head>
G, k/ j* g1 D - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
& U- ?4 P G% ~! M* \ - <title> Afilter Tracker Google 广告点击追踪演示</title>
7 v- _4 l% n' K- I: O+ k - <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
% E: D* `, z9 V8 f2 F: t - <script type="text/javascript">
: C9 L( r7 U' D6 P - 3 t- P8 P/ S" Y M
- var isOverGoogleAd = false;
" P# ]5 [: z2 E; E9 M2 H# ^" Z - var ad = /adsbygoogle/;: S4 K: F- z! @8 r3 r, {9 e. b8 F
! q& A Y$ R+ C* a- $(document).ready(function(); { I$ [! I4 ^( Z/ w3 a
- {( F d8 }& z- g b/ z$ k
- $('ins').on('mouseover', function () {
5 D3 b) ~" {/ i/ U6 R - if(ad.test($(this).attr('class'))){0 `; E" J# `& K! u- I
- isOverGoogleAd = true;9 a. c; R# n* A% _% P
- }
6 K6 }4 K& F+ i5 \0 L4 }% D* r - });
/ x4 K( u# M2 Q' q _ - $('ins').on('mouseout', function () {
! U5 ?0 `4 g% Y8 q+ W7 v' b - if(ad.test($(this).attr('class'))){
2 g8 v! H0 H9 i2 F; e, Y, p: \/ w1 K1 c - isOverGoogleAd = false;5 w) M9 d$ i. M7 o4 r
- }
/ N- i! m3 ]- V - });3 {' ~" i$ ^2 F+ v8 }% q' U
- });2 ?9 h% p4 |/ ^
) J5 v5 \! G, o+ N- $(window).blur(function(e){$ J! s- V# R0 s! X3 U8 `
- if(isOverGoogleAd){& r+ R$ h# n6 U- i( O: d5 d
- //检测到点击。
; h4 i# Z" G( W- O' o0 ~9 ~ - }
+ o" P/ b; ~8 D; Q8 s) w: }. x - });
6 {$ s9 I7 k3 Z) F: X1 b - </script>9 x' P7 ~% ]9 a g/ z
- </head>
- o- y! ]8 B- X$ ?/ f! s - <body>
. T( _! C1 Z/ z2 |$ O# v - / E1 _4 r# H$ m$ r; q, C
- <script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>: g& B9 p" @* y) V4 i6 g4 l; A
- <!-- qym -->
2 ?& g2 P U% R- X5 Z5 i, n - <ins class='adsbygoogle'" Q% u* P, r' d* t4 T8 w1 N* s
- style='display:inline-block;width:970px;height:90px'3 I3 R) S" y' b. G6 P+ q. L
- data-ad-client='ca-pub-111111111111111'4 R" `' E" T4 T! B% o4 m4 K
- data-ad-slot='1111111111'></ins>
) O2 M2 ^9 ^2 _! A - <script>; {* @/ ?9 r; J8 D: a
- (adsbygoogle = window.adsbygoogle || []).push({});
: Y9 P6 }: ]& E7 d, n - </script>% M5 B' Q) U* c" }% r4 n
7 X) Y2 @4 i- ^9 u5 {+ ?0 s3 n; Z, X- </body>
" O0 V" H4 e! D { - </html>
复制代码 1 _3 \1 z- ]3 ]+ m
$ t# Z1 u: t7 K: ?0 F
Google Adsense 广告点击追踪的代码,亲测有效。
* F. t% v) M9 m8 q& r+ w- j
]" u7 J7 _4 X# F( i4 t; c9 ^配合点击追踪 对于那些买流量做adsense的 很有帮助。
9 u6 Y) W; k2 c2 t1 K
. G; ~0 h" D% | |
评分
-
查看全部评分
|