Skip to content

Commit

Permalink
GAタグを挿入する。
Browse files Browse the repository at this point in the history
  • Loading branch information
champierre committed Jun 18, 2024
1 parent 5d3114e commit a2adbfa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,18 @@ DESCRIPTION="\
}${LF}\
},"
sed -e "s|^export default \[$|import ${EXTENSION_ID}IconURL from './${EXTENSION_ID}/${EXTENSION_ID}.png';${LF}import ${EXTENSION_ID}InsetIconURL from './${EXTENSION_ID}/${EXTENSION_ID}-small.png';${LF}${LF}export default [${LF}${DESCRIPTION}|g" src/lib/libraries/extensions/index.jsx_orig > src/lib/libraries/extensions/index.jsx

GA_TAG="\<title>TM2Scratch</title>${LF}\
${LF}\
<!-- Global site tag (gtag.js) - Google Analytics -->${LF}\
<script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-105345-36\"></script>${LF}\
<script>${LF}\
window.dataLayer = window.dataLayer \|\| [];${LF}\
function gtag(){dataLayer.push(arguments);}${LF}\
gtag('js', new Date());${LF}\
${LF}\
gtag('config', 'UA-105345-36');${LF}\
</script>${LF}\
"
mv src/playground/index.ejs src/playground/index.ejs_orig
sed -e "s|<title><%= htmlWebpackPlugin.options.title %></title>|${GA_TAG}|g" src/playground/index.ejs_orig > src/playground/index.ejs

0 comments on commit a2adbfa

Please sign in to comment.