michaelp
michaelp

Reputation: 363

Adobe DTM header for a library download

Background: My company is starting a proof of concept for adobe DTM and I am starting to familiarize myself with it. We have many different domains and many different internal sections that all may want to use different libraries on different pages. We are using the library download setup in DTM. I've watched a lot of the tutorials the tool and have read all of the documentation that I could find on the headers.

Issue: I believe that the libraries are all created with the DTM tool. For instance, if we create a rule, or add 3rd party javascript to DTM, then that would be placed in the library. Because of the way that the team has generally thought about js libraries before, where we upload them ourselves, most of the team believes that we can physically place the 3rd party js libraries in the location designated by the header and that we can reference them with an include() call in the Javascript/Third Party Tags section of a rule. I don't believe this is possible. Is there anyone who can shed some light on this?

Thanks for your time, Mike

Upvotes: 0

Views: 1240

Answers (1)

Benjamin Bytheway
Benjamin Bytheway

Reputation: 401

(I already answered this at the Adobe Forums, but I thought I would include the reply here for others looking at stack exchange)

I could be wrong in my assumptions, but I have always understood this method as a way to simply host DTM functionality on your own servers for downtime/uptime/SLA reasons. :) Meaning, you would want to go with this option simply because you need to ensure that DTM embed urls/scripts never ever go down and that they are lightning fast and never give you issues. :) You would then use the script loading capabilities by configuring the DTM UI to load the 3rd party scripts or custom built scripts through rules. You would load them either on pageLoad top or bottom, domReady, or onLoad. There is more documentation on this option here and some reasons why you would use that option:

http://microsite.omniture.com/t2/help/en_US/dtm/hosting.html

http://microsite.omniture.com/t2/help/en_US/dtm/deployment_download.html

However, you can also include these scrips just like you would with any other javascript reference like you mentioned above. The trick would be just figuring out the url to include as your src attribute. DTM itself has an API that you can use to load scripts, and it also includes a "settings" property and "configurationSettings" property that you can use to find a lot of those scripts that you are interested in loading. See all _satellite object documentation here:

http://microsite.omniture.com/t2/help/en_US/dtm/object_reference.pdf

In more detail, you could do something like this to get your script path dynamically after DTM embed scripts have loaded:

var scriptSrc = "//domainOfHost.com/" + _satellite.settings.scriptDir + "scriptSrc.js";

Then you could use this function on the _satellite object to load the script you are interested in:

_satellite.loadScript: function (url, callback)

PARAMETERS:

  • url: the URL of the script

  • callback(optional): the function to be called after the script has loaded.

DESCRIPTION: Load an external script. Thanks, Ben

Upvotes: 1

Related Questions