Retrieve libraries names in JS?

Gold Contributor
Gold Contributor

Hi
Is there a way to retrieve the names of libraries that have been loaded by a profile in Javascript? We would like to expose this in a data layer attribute for easier testing / debugging. 
Many thanks for your ideas

2 REPLIES 2

Retrieve libraries names in JS?

Tealium Expert
Tealium Expert

I'm afraid it's not possible, @jmbolfing, - the publish engine treats inherited objects in the same way as it would have if they were created within the profile itself. There's nothing in the published utag.js that makes mention of any source libraries.

One possible workaround would be to create an All Tags extension in each profile/library which runs the following:

b.library_list = (b.library_list || "") + "main" + ";"

Changing the "main" to the name of the current library.. Which would then create a UDO variable that would end up containing a semi-colon delimited list of all the libraries that were inherited.

Retrieve libraries names in JS?

Gold Contributor
Gold Contributor

Many thanks @UnknownJ for sharing your thoughts. Your proposed solution sounds feasible. We are going to run a test with this.

Public