Skip to content

Commit 85e366c

Browse files
committed
MNT: Update AdSense script
1 parent 65b31fd commit 85e366c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if [ "$IS_RELEASE" ]; then
3232
ANALYTICS="<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;ga('create','UA-43663477-5','auto');ga('require','cleanUrlTracker',{indexFilename:'index.html',trailingSlash:'add'});ga('require','outboundLinkTracker',{events:['click','auxclick','contextmenu']});ga('require','maxScrollTracker');ga('require','pageVisibilityTracker');ga('send','pageview');setTimeout(function(){ga('send','event','pageview','view')},15000);</script><script async src='https://www.google-analytics.com/analytics.js'></script><script async src='https://cdnjs.cloudflare.com/ajax/libs/autotrack/2.4.1/autotrack.js'></script>"
3333
find "$BUILDROOT" -name '*.html' -print0 |
3434
xargs -0 -- sed -i "s#</body>#$ANALYTICS</body>#i"
35-
ANALYTICS='<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script>(adsbygoogle=window.adsbygoogle||[]).push({google_ad_client:"ca-pub-2900001379782823",enable_page_level_ads:true});</script>'
35+
ANALYTICS='<script data-ad-client="ca-pub-2900001379782823" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>'
3636
find "$BUILDROOT" -name '*.html' -print0 |
3737
xargs -0 -- sed -i "s#</head>#$ANALYTICS</head>#i"
3838
fi

0 commit comments

Comments
 (0)