Skip to content

Commit

Permalink
Clean up 'user-error-reporting' (ampproject#20779)
Browse files Browse the repository at this point in the history
* Clean up user-error-reporting.

* Fix lint.
  • Loading branch information
William Chou authored and bramanudom committed Mar 22, 2019
1 parent f821798 commit 7bac5e5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion extensions/amp-analytics/amp-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ The element visibility trigger waits for the signal specified by the `waitFor` p
If `reportWhen` is specified, the trigger waits for that signal before sending the event. This is useful, for example, in sending analytics events when the page is closed.
##### Error trigger (In experiment)
##### Error trigger
The user error event (`"on": "user-error"`) is triggered when an error occurs that is attributable to the author of the page or to software that is used in publishing the page. This includes, but not limited to, misconfiguration of an AMP component, misconfigured ads, or failed assertions. User errors are also reported in the developer console.
Expand Down
4 changes: 1 addition & 3 deletions src/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
experimentTogglesOrNull,
getBinaryType,
isCanary,
isExperimentOn,
} from './experiments';
import {exponentialBackoff} from './exponential-backoff';
import {getMode} from './mode';
Expand Down Expand Up @@ -666,8 +665,7 @@ export function detectJsEngineFromStack() {
export function reportErrorToAnalytics(error, win) {
// Currently this can only be executed in a single-doc mode. Otherwise,
// it's not clear which ampdoc the event would belong too.
if (Services.ampdocServiceFor(win).isSingleDoc()
&& isExperimentOn(win, 'user-error-reporting')) {
if (Services.ampdocServiceFor(win).isSingleDoc()) {
const vars = dict({
'errorName': error.name,
'errorMessage': error.message,
Expand Down
5 changes: 0 additions & 5 deletions tools/experiments/experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,6 @@ const EXPERIMENTS = [
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/9413',
spec: 'https://github.com/ampproject/amphtml/issues/9277',
},
{
id: 'user-error-reporting',
name: 'Report error to publishers',
spec: 'https://github.com/ampproject/amphtml/issues/6415',
},
{
id: 'disable-rtc',
name: 'Disable AMP RTC',
Expand Down

0 comments on commit 7bac5e5

Please sign in to comment.