Creative URL

This page covers data collection for the Creative URL variable. See Creative URL for the corresponding reporting dimension.

The creative URL variable is the URL of the ad creative. Use the variable to track the asset location of each creative when the URL itself is meaningful for analysis (for example, distinguishing CDN paths or creative versions).

Property
Value
Context data variable
a.media.ad.creativeURL
XDM collection field
xdm.mediaCollection.advertisingDetails.creativeURL
Audience Manager trait
c_contextdata.a.media.ad.creativeURL
Required
No
Sent with
Ad start, ad close
Web SDK

Set creativeURL inside xdm.mediaCollection.advertisingDetails when calling sendEvent:

code language-javascript
alloy("sendEvent", {
  xdm: {
    eventType: "media.adStart",
    mediaCollection: {
      advertisingDetails: {
        name: "ad-2125",
        creativeURL: "https://cdn.example.com/ads/creative-987.mp4"
      },
      sessionID: "{sid}",
      playhead: 0
    }
  }
});
iOS

Pass the creative URL as a metadata key in the HashMap argument to trackEvent(AdStart). Use MediaConstants.AdMetadataKeys.CREATIVE_URL.

code language-swift
var metadata: [String: String] = [:]
metadata[MediaConstants.AdMetadataKeys.CREATIVE_URL] = "https://cdn.example.com/ads/creative-987.mp4"

tracker.trackEvent(event: MediaEvent.AdStart, info: adObject, metadata: metadata)
Android

Pass the creative URL as a metadata key in the HashMap argument to trackEvent(AdStart). Use MediaConstants.AdMetadataKeys.CREATIVE_URL.

code language-kotlin
val metadata = HashMap<String, String>()
metadata[MediaConstants.AdMetadataKeys.CREATIVE_URL] = "https://cdn.example.com/ads/creative-987.mp4"

tracker.trackEvent(Media.Event.AdStart, adObject, metadata)
Roku

Set creativeURL inside xdm.mediaCollection.advertisingDetails when calling sendMediaEvent for media.adStart:

code language-brightscript
m.aepSdk.sendMediaEvent({
    "xdm": {
        "eventType": "media.adStart",
        "mediaCollection": {
            "advertisingDetails": {
                "name": "ad-2125",
                "creativeURL": "https://cdn.example.com/ads/creative-987.mp4"
            },
            "playhead": 0
        }
    }
})
Media Edge API

Call the adStart endpoint with creativeURL inside xdm.mediaCollection.advertisingDetails:

code language-json
{
  "events": [{
    "xdm": {
      "eventType": "media.adStart",
      "mediaCollection": {
        "advertisingDetails": {
          "name": "ad-2125",
          "length": 15,
          "playerName": "Freewheel",
          "podPosition": 0,
          "creativeURL": "https://cdn.example.com/ads/creative-987.mp4"
        },
        "sessionID": "{sid}",
        "playhead": 0
      }
    }
  }]
}

Legacy implementation types (Analytics-only)

Media SDK JS 3.x

Pass the creative URL in the contextData object using ADB.Media.AdMetadataKeys.CreativeUrl:

code language-javascript
var contextData = {};
contextData[ADB.Media.AdMetadataKeys.CreativeUrl] = "https://cdn.example.com/ads/creative-987.mp4";

tracker.trackEvent(ADB.Media.Event.AdStart, adInfo, contextData);
Chromecast

Set the creative URL using ADBMobile.media.AdMetadataKeys.CREATIVE_URL in the standard ad metadata object:

code language-javascript
var adInfo = ADBMobile.media.createAdObject("Ford F-150", "ad-2125", 1, 30);
var standardAdMetadata = {};
standardAdMetadata[ADBMobile.media.AdMetadataKeys.CREATIVE_URL] = "https://cdn.example.com/ads/creative-987.mp4";
adInfo[ADBMobile.media.MediaObjectKey.StandardAdMetadata] = standardAdMetadata;
ADBMobile.media.trackEvent(ADBMobile.media.Event.AdStart, adInfo, null);
Media Collection API

Include media.ad.creativeURL in the params object:

code language-json
{
  "playerTime": { "playhead": 0, "ts": 1699523820000 },
  "eventType": "adStart",
  "params": {
    "media.ad.creativeURL": "https://cdn.example.com/ads/creative-987.mp4"
  }
}

See the Media Collection API events reference for the full request structure.

recommendation-more-help
media-analytics-help