mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add analytics
This commit is contained in:
parent
55904ccf04
commit
bd4204fc42
1 changed files with 9 additions and 0 deletions
|
|
@ -1166,6 +1166,15 @@ export const setFavoriteArticleResolver = authorized<
|
|||
MutationSetFavoriteArticleArgs
|
||||
>(async (_, { id }, { claims: { uid }, log, pubsub }) => {
|
||||
try {
|
||||
analytics.track({
|
||||
userId: uid,
|
||||
event: 'setFavoriteArticle',
|
||||
properties: {
|
||||
env: env.server.apiEnv,
|
||||
id,
|
||||
},
|
||||
})
|
||||
|
||||
const page = await getPageByParam({ userId: uid, _id: id })
|
||||
|
||||
if (!page) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue