DIL create

Creates a partner-specific DIL instance.

Function Signature: DIL.create: function (initConfig) {}

initConfig Elements

Important: The visitorService property is always required. Other properties listed here are optional, unless indicated otherwise.

initConfig accepts the following elements:

Name Type Description

containerNSID

Integer

This property sets the container ID used by Audience Manager for ID syncs. You would set containerNSID if you have DIL deployed across multiple sites. Each of these sites will have their own container ID and ID syncs. When you have only 1 site, the container ID is 0 by default and you don't need to set this properly. Contact your consultant to get a list of your sites and their container IDs.

In the Experience Cloud ID service, the property idSyncContainerID corresponds to containerNSID in DIL. Note the following if you're using DIL and the ID service across multiple sites:

  • For each site, set the same container IDs on containerNSID and idSyncContainerID.
  • Both DIL and the ID service will try to send ID syncs to our data collection iFrame. However, the iFrame ensures that DIL won't fire an ID sync. This prevents duplication.
  • Only DIL sends data to a URL destination.

See also, idSyncContainerID.

declaredId

Object

delcaredId is used to pass in either the:

  • dpid: Data partner ID assigned to you by Audience Manager.
  • dpuuid: Your unique ID for a user.
Important: Only use un-encoded values for your IDs. Encoding will create double-encoded identifiers.
Note: If you use the Visitor ID Service, set customer IDs with the setCustomerIDs method instead of DIL. See Customer IDs and Authentication States.

delayAllUntilWindowLoad

Boolean

If true, defers all requests (IFRAME, event calls, ID sync, and destinationing) from executing until the Page Load event fires. Default is false.

disableDeclaredUUIDCookie

Boolean

False by default, which means Audience Management sets a cookie in the partner's domain (sets a first party cookie).

disableDestinationPublishingIframe

Boolean

If true, will not attach the destination publishing IFRAME to the DOM or fire destinations. Default is false.

disableIDSyncs

Boolean

Disables ID synchronization. You must disable ID syncs when using DIL v6.2+ and the Visitor ID Service. The visitorService function (see sample code below) takes care of this operation.

enableErrorReporting

Boolean

Set to true to enable error reporting for all DIL instances on the page. Works with Boolean true only.

iframeAkamaiHTTPS

Boolean

Specifies if the destination publishing template should use Akamai for HTTPS connections. Enabled on a per-partner basis.

mappings

Object

Associates the value from one key-value pair to another. See Map Key Values to Other Keys. Released with v2.4.

namespace

String

Required.

The namespace key-value pair contains is your Experience Cloud Organization ID. If you don't have this ID, you can find it in the Administration section of the Experience Cloud dashboard. You need administrator permissions to view this dashboard. See the Product Features and Functions FAQ and Administration - User Management and FAQ.

partner

String

Required.

Partner name as provided by Audience Management.

removeFinishedScriptsAndCallbacks

Boolean

Removes scripts and callbacks. Default is False. Applies to the current DIL instance only. Released with v3.3.

uuidCookie

Object

Sets a cookie with the unique user ID returned from Audience Management. See uuidCookie Properties.

visitorService

Object

Required with DIL 6.2 or greater.

DIL relies on the setCustomerIDs function in the Visitor ID Service to pass declared IDs into Audience Manager. See Customer IDs and Authentication States for more information.

Sample Code

A sample DIL call could look similar to the following:

var partnerObject1 = DIL.create({
  partner: "partner name",
  visitorService:{
    namespace: "INSERT-ORGANIZATION-ID-HERE"
  },
  containerNSID: 3,
  uuidCookie:{
    name:'ad_uuid',
    days:200,
    path:'/test',
    domain:'adobe.com',
    secure:true
  }
});

var partnerObject2 = DIL.create({
  partner: "partner name",
  visitorService:{
    namespace: "INSERT-MCORG-ID-HERE"
  },
  containerNSID: 3,
  disableDestinationPublishingIframe: true
});

A successful response returns the DIL instance. An unsuccessful attempt returns an error object (not thrown) if your code is configured improperly or whenever an error is encountered.