Skip to content

Commit

Permalink
feat: add umami
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jul 22, 2024
1 parent 4f79881 commit d7e02eb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,26 @@ calculateValue();
logger.error('Remote config load failed.', error);
}
}

if (!envs.DISABLE_UMAMI) {
ofetch(`https://umami.rss3.io/api/send`, {
method: 'POST',
headers: {
'content-type': 'application/json',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36',
},
body: JSON.stringify({
payload: {
hostname: 'rsshub.app',
language: 'en-US',
referrer: 'rsshub.app',
url: 'rsshub.app',
website: '239067cd-231f-4a3f-a478-cced11a84876',
},
type: 'event',
}),
});
}
})();

// @ts-expect-error value is set
Expand Down

0 comments on commit d7e02eb

Please sign in to comment.