[inner]
Create an instance of the AnalyticsService.
- This is an internal constructor and shouldn't be called by regular
users.

Static Field Details

adobeDPS-AnalyticsService.ALLOWED_VARIABLES

The list of allowed variables for use within analytics events. These variables can be
aliased or used within the variables object.

adobeDPS-AnalyticsService.ALLOWED_EVENTS

The list of allowed custom events. These events can be aliased but you must use one of
these events when sending custom events.

adobeDPS-AnalyticsService.PURCHASE_CATEGORIES

The list of allowed categories for all purchase events.

adobeDPS-AnalyticsService.instance

The singleton of the AnalyticsService.

Field Details

variables: Object

Variables that are added to this object will be sent with all subsequent analytics
calls. I.E. analyticsService.variables['productId'] = 'test1234' will cause all
subsequent analytics tracking calls to have the productId variable set to
'test1234'. The only exception would be if the event that is sent after the
variable is sent contains the variable as well. In this case, the variable value
will be overridden by the value sent in the event.

Method Details

setCustomVariableAlias(realName:String, alias:String)

Function used to set a custom alias for an analytics property. After setting the new
alias, that alias can be used in subsequent calls to track events when sending
properties.

Parameters

realName

String

The real name of the analytics event property as defined in ALLOWED_VARIABLES.

alias

String

The alias to use for the real property.

See:

adobeDPS-AnalyticsService#ALLOWED_VARIABLES

setCustomEventAlias(realName:String, alias:String)

Function used to set a custom alias for an analytics event. After setting the new
alias, that alias can be used in subsequent calls to track events.

Function used to track a purchase start event.
WARNING: Purchase events will be tracked automatically for purchases of Folios
through the API. This function should only be used to track purchases outside of the API

Parameters

category

String

The type of purchase event this is. Must be valued defined in PURCHASE_CATEGORIES

Function used to track a purchase complete event.
WARNING: Purchase events will be tracked automatically for purchases of Folios
through the API. This function should only be used to track purchases outside of the API

Parameters

category

String

The type of purchase event this is. Must be valued defined in PURCHASE_CATEGORIES