-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
track Pendo ad blocking #1122
track Pendo ad blocking #1122
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1122 +/- ##
=======================================
Coverage 53.01% 53.01%
=======================================
Files 65 65
Lines 1311 1311
Branches 258 258
=======================================
Hits 695 695
Misses 491 491
Partials 125 125
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing multiple requests for the same resource, we could also try using the onerror
handler.
s.onerror = function(error){console.log(error, 'error')}
In this case you could add that callback to here
(v[w]);y=e.createElement(n);y.async=!0;y.src=`https://content.analytics.cloud.redhat.com/agent/static/${API_KEY}/pendo.js`
Targeting the "y" element.
y.onerror = function(error){log('Pendo blocked')}
e869530
to
27414a5
Compare
@Hyperkid123 Thanks! It seems to work and it is much nicer! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing a regular log, can you either throw a console.error or log it to Sentry that way we can gather the metrics in sentry?
5849c28
to
d5baeb5
Compare
Try to fetch pendo,if not successful log that pendo is blocked. By defaul
fetch
has huge timeout, so I have made it 5 sec instead.https://issues.redhat.com/browse/RHCLOUD-9700