Skip to content
Permalink
Browse files

MNT: build.sh: Replace defunct gtag.js with analytics.js

  • Loading branch information...
kernc committed Jan 5, 2019
1 parent 7027263 commit c9712e048f26dc0e0ce3d4940befe1f2fe1ad2c5
Showing with 2 additions and 2 deletions.
  1. +2 −2 doc/build.sh
@@ -56,9 +56,9 @@ PYTHONWARNINGS='ignore::UserWarning' \
if [ "$IS_RELEASE" ]; then
echo -e '\nAdding GAnalytics code\n'

ANALYTICS="<script>window.dataLayer=[['js',new Date()],['config','UA-43663477-4']]</script><script async src='https://www.googletagmanager.com/gtag/js?id=UA-43663477-4'></script>"
ANALYTICS="<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;ga('create','UA-43663477-4','auto');ga('send','pageview');</script><script async src='https://www.google-analytics.com/analytics.js'></script>"
find "$BUILDROOT" -name '*.html' -print0 |
xargs -0 -- sed -i "s#<head>#<head>$ANALYTICS#i"
xargs -0 -- sed -i "s#</body>#$ANALYTICS</body>#i"
fi


0 comments on commit c9712e0

Please sign in to comment.
You can’t perform that action at this time.