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 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.
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"
}
}
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"
}
}
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"
}
}
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"
}
}
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"
}
}
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"
}
}
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"
}
}
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"
}
}
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 contributes the following URL substitutions to the amp-var-substitutions.md.
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.
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.