MediaJel / mediajel-tracker

hosted mediajel tracker
4 stars 1 forks source link

Implement log error handling in mediajel-tracker to catch code errors #379

Open pacholoamit opened 8 months ago

pacholoamit commented 8 months ago

Description

We want to be able to find a way to track client-side errors from our tag

For version 1:

???

For version 2: Link to reference: https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/errors/?platform=js

window.tracker('enableErrorTracking')
jonmediajel commented 6 months ago

We could use this one for v1 and v2 to track error by try catching them. Will implement this after ticket is merged in staging

https://github.com/orgs/MediaJel/projects/5/views/1?filterQuery=&pane=issue&itemId=57175298

// version 1 window.tracker('trackError','Cannot get user object','shop.js')

//version 2

 window.tracker('trackError', {
  message: 'Cannot get user object',
  filename: 'shop.js',
  error: "test error"
}) 

Image

pacholoamit commented 6 months ago

Update: PR in progress

pacholoamit commented 3 weeks ago

Lets try and use this approach for Error tracking

https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/web-tracker/tracking-events/errors/#automatic-error-tracking

For discussion: Instead of rolling this out to all of our clients on the mediajel-tracker. We can roll this out in the frictionless-repo

SeanRizarre commented 6 days ago

Update: