Show Menu
TOPICS×

DIL create method

DIL create

Creates a partner-specific DIL instance.
Function Signature: DIL.create: function (initConfig) {}
initConfig Elements
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 .
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 Experience Cloud 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 Manager sets a cookie in the partner's domain (sets a first party cookie).
disableDestinationPublishingIframe
Boolean
Important: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.disableIdSyncs function in the Experience Cloud ID Service instead.
If true , will not attach the destination publishing IFRAME to the DOM or fire destinations. Default is false .
disableIDSyncs
Boolean
Important: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.disableIdSyncs function in the Experience Cloud ID Service instead.
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
Important: This element has been deprecated with DIL version 8.0 (released August 2018). Use the visitor.idSyncSSLUseAkamai function in the Experience Cloud ID Service instead.
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 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 Manager .
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 Manager . See uuidCookie Properties .
visitorService
Object
Required with DIL 6.2 or greater.
DIL relies on the setCustomerIDs function in the Experience Cloud 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 
}); 

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.

uuidCookie Properties

Defines the properties used by the uuidCookie variable. This variable is part of the DIL.create method.
uuidCookie has the following properties:
Name
Description
name
The cookie name ( aam_did is default).
days
Cookie lifetime (100 days is default).
path
Cookie path, e.g., '/test' ( / is default).
domain
The domain the cookie is set in, e.g., 'adobe.com' ( '.'+document.domain is default).
secure
Sets a flag to send data over an HTTPS connection only.

visitorService Properties

Defines the properties used by the visitorService variable. This variable is part of the DIL.create method.
visitorService has the following properties:
Name
Type
Description
namespace
String
Required. Represents The Experience Cloud Org ID. This is needed for Experience Cloud Core Service functionality. Same parameter used to instantiate the Visitor ID functionality.
Code Sample:
var vDil = DIL.create({ 
    partner: 'demofirst', 
    visitorService: { 
        namespace: "INSERT-EXPCLOUD-ORG-ID-HERE" 
    } 
});