Swap out Fathom for Matomo
This commit is contained in:
parent
ea97201816
commit
1efec98b9a
3 changed files with 8 additions and 14 deletions
8
index.ts
8
index.ts
|
@ -61,7 +61,13 @@ function writeTemplate(
|
|||
) {
|
||||
const outputFile = join(BUILD_DIR, value, 'index.html');
|
||||
mkdirp.sync(dirname(outputFile));
|
||||
writeFileSync(outputFile, template(context).replace(NEW_LINES_RE, ''));
|
||||
writeFileSync(
|
||||
outputFile,
|
||||
template({
|
||||
...context,
|
||||
outputUrl: encodeURIComponent(`https://givemoneyto.me/${value}/`),
|
||||
}).replace(NEW_LINES_RE, '')
|
||||
);
|
||||
}
|
||||
|
||||
function writeRedirects(redirects: ReadonlyArray<Redirect>) {
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
(function(f, a, t, h, o, m){
|
||||
a[h]=a[h]||function(){
|
||||
(a[h].q=a[h].q||[]).push(arguments)
|
||||
};
|
||||
o=f.createElement('script'),
|
||||
m=f.getElementsByTagName('script')[0];
|
||||
o.async=1; o.src=t; o.id='fathom-script';
|
||||
m.parentNode.insertBefore(o,m)
|
||||
})(document, window, '//fathom.theorangeone.net/tracker.js', 'fathom');
|
||||
|
||||
fathom('set', 'siteId', 'GOWOM');
|
||||
fathom('trackPageview');
|
|
@ -20,6 +20,6 @@
|
|||
|
||||
<script type="text/javascript" src="../node_modules/bootstrap/js/src/index.js"></script>
|
||||
|
||||
<script type="text/javascript" src="./fathom.js"></script>
|
||||
<img src="https://matomo.theorangeone.net/matomo.php?idsite=2&rec=1&url={{ outputUrl }}" style="border:0" />
|
||||
</body>
|
||||
</html>
|
||||
|
|
Reference in a new issue