Skip to content

Latest commit

 

History

History
161 lines (117 loc) · 5.25 KB

amp-access-analytics.md

File metadata and controls

161 lines (117 loc) · 5.25 KB

AMP Access and Analytics

Experiment: "amp-access-analytics" should be enabled via https://cdn.ampproject.org/experiments.html or AMP.toggleExperiment('amp-access-analytics'). See Experiments Guide.

An integration with amp-analytics is under development and can be tracked on Issue #1556. This document will be updated when more details on the integration are available.

Access analytics triggers

Access service issues events for major states in the access flow. These events can be reported via an analytics package using triggers.

See amp-analytics.md for details on amp-analytics configuration.

Authorization received trigger ("on": "access-authorization-received")

The access-authorization-received event is issued when the Authorization endpoint has succeeded. Use these configurations to fire a request for this event.

"triggers": {
  "accessAuthorizationReceived": {
    "on": "access-authorization-received",
    "request": "event"
  }
}
Authorization received trigger ("on": "access-authorization-failed")

The access-authorization-failed event is issued when the Authorization endpoint has failed. Use these configurations to fire a request for this event.

"triggers": {
  "accessAuthorizationFailed": {
    "on": "access-authorization-failed",
    "request": "event"
  }
}
Access view registered trigger ("on": "access-viewed")

The access-viewed event is issued when the access system considers the page viewed and right before pingback is sent. Use these configurations to fire a request for this event.

"triggers": {
  "accessViewed": {
    "on": "access-viewed",
    "request": "event"
  }
}
Pingback sent trigger ("on": "access-pingback-sent")

The access-pingback-sent event is issued when the Pingback endpoint has succeeded. Use these configurations to fire a request for this event.

"triggers": {
  "accessPingbackSent": {
    "on": "access-pingback-sent",
    "request": "event"
  }
}
Pingback failed trigger ("on": "access-pingback-failed")

The access-pingback-failed event is issued when the Pingback endpoint has failed. Use these configurations to fire a request for this event.

"triggers": {
  "accessPingbackFailed": {
    "on": "access-pingback-failed",
    "request": "event"
  }
}
Login started trigger ("on": "access-login-started")

The access-login-started event is issued right before the Login dialog has been opened. Use these configurations to fire a request for this event.

"triggers": {
  "accessLoginStarted": {
    "on": "access-login-started",
    "request": "event"
  }
}
Login success trigger ("on": "access-login-success")

The access-login-success event is issued when Login dialog has succeeded. Use these configurations to fire a request for this event.

"triggers": {
  "accessLoginSuccess": {
    "on": "access-login-success",
    "request": "event"
  }
}
Login rejected trigger ("on": "access-login-rejected")

The access-login-rejected event is issued when Login dialog has been rejected by the user. Use these configurations to fire a request for this event.

"triggers": {
  "accessLoginRejected": {
    "on": "access-login-rejected",
    "request": "event"
  }
}
Login failed trigger ("on": "access-login-failed")

The access-login-failed event is issued when Login dialog has failed due to an unknown reason. Use these configurations to fire a request for this event.

"triggers": {
  "accessLoginFailed": {
    "on": "access-login-failed",
    "request": "event"
  }
}

Access analytics variables

Access contributes the following URL substitutions to the amp-var-substitutions.md.

ACCESS_READER_ID

The ACCESS_READER_ID variable is substituted with the Reader ID used for access operations. This is a sensitive ID and care should be taken in sharing it. Please ensure that any data you pass to a third party complies with its terms of service.

AUTHDATA(field)

The AUTHDATA(field) variable is substituted with the value of the field in the authorization response. The nested fields are allowed, such as AUTHDATA(nested.field).

This variable is replaced with empty string if queried before the authorization response is received.

Data contained in AUTHDATA may be sensitive and care should be taken in sharing it. Please ensure that any data you pass to a third party complies with its terms of service.