feat: added tracker for page, page block, and gpt (#623)

* refactor: made events function generic

* feat: added tracker for page, page block, and gpt
This commit is contained in:
Dakshesh Jain 2023-03-30 19:27:46 +05:30 committed by GitHub
parent 50275fd2ad
commit 66ed6a1dc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 375 additions and 360 deletions

View file

@ -37,12 +37,15 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// TODO: cache user info
jitsu
.id({
id: user.id,
email: user.email,
first_name: user.first_name,
last_name: user.last_name,
})
.id(
{
id: user.id,
email: user.email,
first_name: user.first_name,
last_name: user.last_name,
},
true
)
.then(() => {
jitsu.track(eventName, {
...extra,