archive
/
givemoneyto.me
Archived
1
Fork 0

Swap out Fathom for Matomo

This commit is contained in:
Jake Howard 2019-10-27 23:18:35 +00:00
parent ea97201816
commit 1efec98b9a
Signed by: jake
GPG Key ID: 57AFB45680EDD477
3 changed files with 8 additions and 14 deletions

View File

@ -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>) {

View File

@ -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');

View File

@ -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&amp;rec=1&amp;url={{ outputUrl }}" style="border:0" />
</body>
</html>