Edit in GitHubLog an issue

Adobe Target event reference

Events handled

The following events are handled by the Target extension:

Target content request

This event is created when an API is called to send a Target request or Target prefetch request for the associated mbox location.

The event is generated by the API in the following situations:

  • When a new Target request needs to be sent (loadRequests or retrieveLocationContent)
  • When a Target prefetch is initiated (prefetchContent)
  • When the Target preview restart deeplink is set (setPreviewRestartDeepLink)
  • When a click notification needs to be sent to Target (locationClicked)
  • When a display notification needs to be sent to Target (locationsDisplayed)

Data payload definition

Here are the key-value pairs in this event:

KeyValue TypeRequiredDescription
restartdeeplink
String
No
Populated when the setPreviewRestartDeepLink API is called.
profileparams
StringMap
No
Populated when the prefetchContent/ loadRequests API is called.
islocationclicked
Boolean
No
Populated when locationClicked API is invoked.
islocationdisplayed
Boolean
No
Populated when locationsDisplayed API is invoked.

The locationClicked API parameters are also sent in the event, as described below:

Copied to your clipboard
{
"islocationclicked": <Boolean>,
"mboxname": <String>,
"mboxparameters": <StringMap>,
"productparameters": <StringMap>,
"orderparameters": <VariantMap>,
"profileparams": <StringMap>
}
KeyValue TypeRequiredDescription
prefetch
VariantVector
No
Populated when the prefetchContent API is called.

The prefetch key contains a list of objects, each with the following content:

Copied to your clipboard
{
"mboxname": <String>,
"mboxparameters": <VariantMap>,
"profileparams": <VariantMap>,
"productparameters": <VariantMap>,
"orderparameters": <VariantMap>
}
KeyValue TypeRequiredDescription
request
VariantVector
No
Populated when loadRequests is called.

The request key contains a list of Target requests, each with the following content:

Copied to your clipboard
{
{
"mboxname": <String>,
"mboxparameters": <VariantMap>,
"profileparams": <VariantMap>,
"productparameters": <VariantMap>,
"orderparameters": <VariantMap>
}
"defaultcontent": <String>,
"responsepairid": <String>
}

Target identity request

This event is a request to retrieve Target identities, such as third-party IDs and TNT IDs, or to set the third-party ID.

This event will be generated by the API that is:

  • Requesting a Target Identity (getThirdPartyId, getTntId).
  • Setting the third-party ID (setThirdPartyId).

Data payload definition

Here are the key-value pairs in this event:

KeyValue TypeRequiredDescription
thirdpartyid
String
No
Populated when the setThirdPartyId API is called.

Target reset request

This event is created by customers who use the API to reset the Target parameters.

This event is generated by the API in the following scenarios:

  • From the customers to clear Target parameters (resetExperience).
  • To clear the prefetch cache (clearPrefetchCache).

Data payload definition

Here are key-value pairs in this event:

KeyValue TypeRequiredDescription
resetexperience
Boolean
No
Present in the event generated by the resetExperience API.
clearcache
Boolean
No
Present in the event generated by the clearPrefetchCache API.

Configuration response content

The data property in the Configuration response content event is used by each extension to modify its current settings. Each extension is responsible to read out the part of the data property for which it is concerned.

The Target extension will read the following keys from the configuration event:

KeyValue TypeRequiredDescription
target.clientCode
String
Yes
The Target Client Code that is obtained during provisioning with the Target solution.
target.environmentId
Integer
No
The Target Environment ID.
target.timeout
Integer
No
This value is used for Target request connection timeouts (in seconds). If the value is not set, a default value of 5 seconds is used.
global.privacy
String
No
This contains the mobile privacy status settings.
target.previewEnabled
Boolean
No
Boolean value to determine whether Target preview should be enabled. If not set, then the preview is enabled by default.

Events dispatched

The following events are dispatched by the Target extension:

Target Content response

This event is created when the Target server response is received, and the prefetch or load request operation is completed. Network responses are generated from the Target server for prefetch or load request calls.

This event is dispatched in the following scenarios:

  • In response to an API prefetch content request. This event contains a prefetchresult key of type boolean, which signals the success or failure of the prefetch request.

  • In response to an API batch load requests, where one event is dispatched per request.

    This event contains a content key of type string that contains mbox content.

Data payload definition

Here are the key-value pairs in this event:

KeyValue TypeRequiredDescription
content
String
No
Response content is returned by the Target server for a load request with valid locations.
prefetchresult
Boolean
No
Prefetch status returned after a Target prefetch request.
prefetcherror
String
No
Prefetch response error if any, otherwise null

Target Identity response

This event delivers the Target identities to the following:

  • The original requester.
  • To any extension that might be listening for updates.

This event is generated by the Target extension as a response to the Target Identity Request event.

Data payload definition

Here are the key-value pairs in this event:

KeyValue TypeRequiredDescription
tntid
String
No
The Target Identifier retrieved from Target server.
thirdpartyid
String
No
The current Third Party ID that is set from the API.

Target preview response

This event is generated when the marketer enters or exits Target preview mode. It can be used to trigger any custom workflows or API calls based on the preview flag by the following:

  • The original requester.
  • To any extension that might be listening for updates.

Data payload definition

Here are the key-value pairs in this event:

KeyValue TypeRequiredDescription
ispreviewinitiated
Boolean
Yes
Value indicating whether Target preview is initiated or stopped.

Shared states

MODULE_NAME: com.adobe.module.target

Shared state for this module is updated when the IDs are set or reset from public or Target servers.

KeyTypeDescription
tntid
String
This is the primary identifier in Target for a user and is also known as PCID or mboxPCID. The tntId is not returned in the Target API response when a thirdPartyId or experienceCloudVisitorId is provided in the request.
thirdpartyid
String
Client-provided visitor ID for Target.
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.