|
|
7 C. s0 t6 Y0 H9 X% d2 M) J% z0 U( I- <html xmlns="http://www.w3.org/1999/xhtml">
4 Q- v$ k* [" r - <head>
6 ~8 K l( z% S6 Q - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />4 V! P m) L0 V$ m
- <title> Afilter Tracker Google 广告点击追踪演示</title>+ n9 e; y4 T0 u% [' {1 T5 t
- <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
$ n w% {; H4 p - <script type="text/javascript">
9 {5 Y. {2 B: `/ g ^# x3 b
& N2 d3 f1 v, V6 G2 u, i8 T/ A- var isOverGoogleAd = false;
$ |- F* |, }8 ^' Z# D6 p8 Y. O - var ad = /adsbygoogle/;
( q; J. b+ n. f# | o2 `
8 ~1 y, V3 | Z* d1 ]! C- $(document).ready(function()% e6 E& w. i0 _: \8 {: F0 B
- {
# Z5 s7 e3 K. ~ - $('ins').on('mouseover', function () {& u8 o0 u# ?! \) g
- if(ad.test($(this).attr('class'))){
; L7 e! s4 B/ m4 i - isOverGoogleAd = true;; z7 s$ g- x& z8 Q2 \+ v
- }# X/ K) ^8 ^9 U
- });
r: x+ ?9 t7 E7 X3 z- j# W. h7 \ - $('ins').on('mouseout', function () {
# ^& f0 m7 u1 n. u4 t - if(ad.test($(this).attr('class'))){( p. V8 E" C( F7 Z) f3 E$ _" ], y% f
- isOverGoogleAd = false;
/ T, O! P3 l6 t5 z1 a9 K% T - }
, J# ?5 z0 F- O- p; B8 ^2 s3 F) M - });
^% Y# P( _, l% y% c - });+ m/ [- k( x0 H
0 m% H' }3 \* S$ K7 l& h" K$ R5 a+ x- $(window).blur(function(e){
; I) n" J) L+ b* _1 B7 d - if(isOverGoogleAd){
+ g9 e9 W0 j! g2 D8 E - //检测到点击。* z+ f6 x" u9 p- i9 t
- }7 @# a2 w% z1 `
- });
! j9 e5 W# P; Q: L- @ - </script>
$ z' N- Y, }+ W* x - </head>
/ S3 Z" y; O+ j/ e5 [, w _ - <body> v$ B6 A g7 A& N+ O+ A# _1 s! x
* H8 p b; q" O0 A- <script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>! F4 ^ `+ S4 {; B) M* U6 F
- <!-- qym -->
5 n/ j/ G5 M0 J) t5 ?/ m - <ins class='adsbygoogle'' v |0 J- r! M3 {* R- R
- style='display:inline-block;width:970px;height:90px'
3 D( U. {( o% X6 C- D- e - data-ad-client='ca-pub-111111111111111'
. v0 \: I- `3 v! U2 Y+ s - data-ad-slot='1111111111'></ins>: y5 ^: p0 f ?$ G
- <script>
X, Y9 ^4 K: v$ e9 X: M5 P; i2 V8 P - (adsbygoogle = window.adsbygoogle || []).push({});6 B: {& D' ^! k" h' ?; G2 [$ k& s
- </script>
; a" f! m6 U6 x
1 E' e p1 |( m5 |+ V- </body>
! Z( @4 J0 [7 ], M - </html>
复制代码
; _0 X+ |' b1 e% ]3 C
# O. @0 ?- T/ ~9 D& }Google Adsense 广告点击追踪的代码,亲测有效。
& p1 Y8 A- F! t; a. d% ~$ i- O, F
J) \7 n7 u6 |' o4 q& R配合点击追踪 对于那些买流量做adsense的 很有帮助。
5 Y7 h7 A+ Y- `7 c2 f/ h2 y. q
7 a& G3 h) R* h |
评分
-
查看全部评分
|