-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
INTENT TO IMPLEMENTProposes implementation of a significant new feature. https://bit.ly/amp-contribute-codeProposes implementation of a significant new feature. https://bit.ly/amp-contribute-codeP2: SoonType: Feature RequestWG: analytics
Milestone
Description
This is for publisher to report client errors (maybe limited for user() error) to a specified analytics platform or their own server, so that they can get their problem noticed and fixed.
Google Webmaster can potentially be one of the pre-configured destinations.
Syntax
Pub configs custom event and error trigger just like other triggers:
<amp-analytics>
<script type="application/json">
{
"requests": {
"error": "https://example.com/report-error?name=${errorName}&message=${errorMessage}"
},
"triggers": {
"Error" {
"on": "error", // new proposed trigger type
"request": "error",
}
}
}
</script>
</amp-analytics>Example change in error logger
All client errors will be piped to specified destinations like this:
// in user() logger impl:
...
errorTrackersFor(doc).then(trackers => {
trackers.forEach(tracker => {
tracker.trackError(tag, message);
});
});
...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
INTENT TO IMPLEMENTProposes implementation of a significant new feature. https://bit.ly/amp-contribute-codeProposes implementation of a significant new feature. https://bit.ly/amp-contribute-codeP2: SoonType: Feature RequestWG: analytics