This page covers data collection for the Site ID variable. See Site ID for the corresponding reporting dimension.
The site ID variable identifies the ad site. Any string value (typically an ID from your ad-server platform) is acceptable.
a.media.ad.sitec_contextdata.a.media.ad.siteRecommended implementation types
Set siteID inside xdm.mediaCollection.advertisingDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the site ID as a metadata key in the HashMap argument to trackEvent(AdStart). Use MediaConstants.AdMetadataKeys.SITE_ID.
| code language-swift |
|---|
|
Pass the site ID as a metadata key in the HashMap argument to trackEvent(AdStart). Use MediaConstants.AdMetadataKeys.SITE_ID.
| code language-kotlin |
|---|
|
Set siteID inside xdm.mediaCollection.advertisingDetails when calling sendMediaEvent for media.adStart:
| code language-brightscript |
|---|
|
Call the adStart endpoint with siteID inside xdm.mediaCollection.advertisingDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the site ID in the contextData object using ADB.Media.AdMetadataKeys.SiteId:
| code language-javascript |
|---|
|
Set the site ID using ADBMobile.media.AdMetadataKeys.SITE_ID in the standard ad metadata object:
| code language-javascript |
|---|
|
Set the site ID using MEDIA_AdMetadataKeySITE_ID in the standard ad metadata object:
| code language-brightscript |
|---|
|
Include media.ad.siteId in the params object:
| code language-json |
|---|
|
See the Media Collection API events reference for the full request structure.