Contains constants and functions for a Analytics Response.
The structure for a Analytics Response is as follows:
{
payload: {
ACPExtensionEventData: {
requestEventIdentifier: <string>,
hitUrl: <string>,
headers: {
ETag: <string>,
},
hitHost: <string>,
},
ACPExtensionEventSource: 'com.adobe.eventsource.responsecontent'
ACPExtensionEventType: 'com.adobe.eventtype.analytics'
ACPExtensionEventName: <string>,
ACPExtensionEventNumber: <integer>,
ACPExtensionEventUniqueIdentifier: <string>,
},
type: 'generic'
vendor: <string>,
annotations: <array>,
clientId: <string>,
timestamp: <number>,
uuid: <string>,
}
Members
(static, constant) EVENT_SOURCE
The value for eventSource
for a Analytics Response.
Path is payload,ACPExtensionEventSource
.
(static, constant) EVENT_TYPE
The value for eventType
for a Analytics Response.
Path is payload,ACPExtensionEventType
.
(static, constant) group
A grouping for this object
(static, constant) label
A label that can be used when describing this object
(static, constant) matcher
Matcher can be used to find matching Analytics Response objects.
- Source:
- See:
-
- kit.match
(static, constant) parentDepth
Describes the number of parents this object has based off schema references. When checking for matches for example, we want to use a schema that is more specific over a more generic schema
(static, constant) path :string
Paths for the keys on a Analytics Response
Properties:
Name | Type | Description |
---|---|---|
payload |
string |
An object with custom data describing the event. |
eventData |
string |
An object with the custom data describing the event. |
requestEventId |
string |
The ID of the event that this is a response to. |
hitUrl |
string |
Query parameter of the data that was passed to Analytics. |
hitHeaders |
string |
The headers returned from the request. |
ETag |
string |
The value used to pull the processing information from the Hit Debugger Service. |
hitHost |
string |
The host url of the service that was hit to pass the data to Analytics. |
eventSource |
string |
The event source. |
eventType |
string |
The event type. |
eventName |
string |
The name of the event. |
sdkEventNumber |
string |
The event number generated by the SDK. |
eventId |
string |
The unique event id. |
rootType |
string |
The type of event. |
vendor |
string |
The vendor of the plugin that sent the event. |
annotations |
string |
Array of Annotation objects. |
clientId |
string |
A unique id that differentiates clients from one another. |
timestamp |
string |
When the event occurred. |
rootId |
string |
Uniquely identifies each event. |
(static, constant) ROOT_TYPE
The value for rootType
for a Analytics Response.
Path is type
.
Methods
(static) get(alias, data) → {*}
Retrieves a value from the object. You can provide either a path or an alias.
Parameters:
Name | Type | Description |
---|---|---|
alias |
string |
Path or alias |
data |
* |
Data to search |
(static) getETag(source) → {string}
Returns the ETag
from the Analytics Response.
This is the the value used to pull the processing information from the Hit Debugger Service.
Path is payload,ACPExtensionEventData,headers,ETag
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The Analytics Response instance |
(static) getHitHeaders(source) → {object}
Returns the hitHeaders
from the Analytics Response.
This is the the headers returned from the request.
Path is payload,ACPExtensionEventData,headers
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The Analytics Response instance |
(static) getHitHeadersKey(…path, source) → {*}
Returns the data using the specified path from the hitHeaders of the Analytics Response.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
path |
string |
<repeatable> |
key in object |
source |
object |
The Analytics Response instance |
(static) getHitHost(source) → {string}
Returns the hitHost
from the Analytics Response.
This is the the host url of the service that was hit to pass the data to Analytics.
Path is payload,ACPExtensionEventData,hitHost
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The Analytics Response instance |
(static) getHitUrl(source) → {string}
Returns the hitUrl
from the Analytics Response.
This is the query parameter of the data that was passed to Analytics.
Path is payload,ACPExtensionEventData,hitUrl
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The Analytics Response instance |
(static) getRequestEventId(source) → {string}
Returns the requestEventId
from the Analytics Response.
This is the the ID of the event that this is a response to.
Path is payload,ACPExtensionEventData,requestEventIdentifier
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The Analytics Response instance |
(static) isMatch(source) → {boolean}
Tests the provided source against the matcher to see if it's Analytics Response event.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The Analytics Response instance |
- Source:
- See:
-
- kit.isMatch
(static) make(…input) → {object}
Generates a Analytics Response with the const values set. Can be useful in testing. Can provide additional data by providing a flat object of paths and values.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
input |
function |
<repeatable> |
Overrides |
(static) mock(…input) → {object}
Generates a Analytics Response with some default values set. Can be useful in testing. Can override defaults and provide additional data by providing a flat object of paths and values.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
input |
function |
<repeatable> |
Overrides |