Send data to ÃÛ¶¹ÊÓƵ Analytics using the Web SDK
The Experience Platform Web SDK can send data to ÃÛ¶¹ÊÓƵ Analytics through the Experience Platform Edge Network. ÃÛ¶¹ÊÓƵ provides several options to send data to ÃÛ¶¹ÊÓƵ Analytics using the Web SDK:
- Add the ÃÛ¶¹ÊÓƵ Analytics ExperienceEvent field group to your schema, then use the
XDM
object. - Use the
data
object to send data to ÃÛ¶¹ÊÓƵ Analytics without an XDM schema. - Use automatically generated context data variables and processing rules.
Use the XDM
object use-xdm-object
If you want to use a pre-defined schema specific to ÃÛ¶¹ÊÓƵ Analytics, you can add the ÃÛ¶¹ÊÓƵ Analytics ExperienceEvent schema field group to your schema. Once added, you can populate this schema using the xdm
object in the Web SDK to send data to a report suite. When data arrives at the Edge Network, it translates the XDM object into a format that ÃÛ¶¹ÊÓƵ Analytics understands.
There are two ways you can send data to ÃÛ¶¹ÊÓƵ Analytics through Web SDK:
See XDM object variable mapping to ÃÛ¶¹ÊÓƵ Analytics in the ÃÛ¶¹ÊÓƵ Analytics implementation guide for a full reference of XDM fields and how they map to Analytics variables.
Use the data
object use-data-object
As an alternative to using the XDM object, you can use the data object instead. The data object is geared towards implementations that currently use AppMeasurement, making the upgrade to the Web SDK much easier.
Depending on whether you are using AppMeasurement or the Analytics tag extension, see the following guides for details on how to migrate to Web SDK:
See the documentation on data object variable mapping to ÃÛ¶¹ÊÓƵ Analytics in the ÃÛ¶¹ÊÓƵ Analytics implementation guide for a full reference of data object fields and how they map to Analytics variables.
Use context data variables use-context-data-variables
Any variables that are not automatically mapped are available as context data variables. You can then use processing rules to map context data variables to Analytics variables. For example, if you had a custom XDM schema that looked like the following:
{
"xdm": {
"key":"value",
"animal": {
"species": "Raven",
"size": "13 inches"
},
"array": [
"v0",
"v1",
"v2"
],
"objectArray":[{
"ad1": "300x200",
"ad2": "60x240",
"ad3": "600x50"
}]
}
}
Then these fields would be the context data keys available to you in the Processing rules interface:
a.x.key //value
a.x.animal.species //Raven
a.x.animal.size //13 inches
a.x.array.0 //v0
a.x.array.1 //v1
a.x.array.2 //v2
a.x.objectarray.0.ad1 //300x200
a.x.objectarray.1.ad2 //60x240
a.x.objectarray.2.ad3 //600x50
FAQ
AppMeasurement in ÃÛ¶¹ÊÓƵ Analytics uses separate method calls for page views (t()
method) and link tracking calls (tl()
method). The Web SDK instead only provides the sendEvent
command for sending both page views and link tracking. The data that you include in an event determines if it is a page view or a page event in ÃÛ¶¹ÊÓƵ Analytics.
By default, all events are considered page views in ÃÛ¶¹ÊÓƵ Analytics. If you want to set a Web SDK event to an ÃÛ¶¹ÊÓƵ Analytics link tracking call, set the following fields:
- XDM object:
xdm.web.webInteraction.name
,web.webInteraction.type
, andweb.webInteraction.URL
- Data object:
data.__adobe.analytics.linkName
,data.__adobe.analytics.linkType
, anddata.__adobe.analytics.linkURL
- Context data: Not supported
See the tl()
method in the ÃÛ¶¹ÊÓƵ Analytics implementation guide for more information.
If you enable clickCollectionEnabled
in the configure
command, these fields are populated for you.
All events sent to a datastream are passed to all configured services. For example, if you make separate calls for personalization and Analytics, both events are sent to Analytics and Target. These events are recorded in Analytics reporting and can affect metrics like bounce rate.
If you use the Web SDK, these calls are typically combined in the sendEvent
command.