Highlighted

Is it possible to have vendor config fields with a tealium custom container?

Rookie Contributor

With supported tags, there are built-in "Vendor Configuration" fields like User ID, Domain, etc, unique to each tag (these fields are referenced in the tag template with the prefix "##UTVARconfig_".  This is convenient as you can you override these values in each site "profile" that is using that tag library. However, if you're using a Tealium Custom Container, I don't see any option for defining fields like this.  Is the only option to use a lookup table extension?  It's less than ideal because you have to key off domain or something else to output the correct value -- and then you need to create a domain lookup table for every custom container tag instead of using the tealium site "profiles" to apply site-specific values overrides.

5 REPLIES 5
Highlighted

Is it possible to have vendor config fields with a tealium custom container?

Tealium Employee

Yes, you can use mapping.  

 

  For example if you map to a destination in the UI of the custom container to "some_configuration_value".  Then in the custom container it would be set to u.data.some_configuration_value when the 'Mapping Code' runs.

 

In the section labeled as "/* Start Tag Sending Code */" you can use this mapped value to set a configuration value in a vendors object.

 

  

someVendorObject.configurationValue = u.data.some_configuration_value ;

 

If you want to set a default value and only overwrite it when the mapped variable is populated ,

 

someVendorObject.configurationValue = u.data.some_configuration_value || "some-default-value";

Setting the value for this configuration value would be done in an extension scoped to this tag, to the UDO property that is mapped to the destination.

 

To avoid 'undefined' errors in the code you can  initializing the new u.data property where is gets declared towards the top of the template.

 

     u.data = {
          /* Initialize default tag parameter values here */
          /* Examples: */
          /* "account_id" : "1234567" */
          /* "base_url" : "//insert.your.javascript.library.url.here.js" */
          /* A value mapped to "account_id" or "base_url" in TiQ will replace these default values. */
       some_configuration_value : "" // you can set here to empty string or the default value
        };
Highlighted

Is it possible to have vendor config fields with a tealium custom container?

Rookie Contributor

But @robert_sabec I want to enter and store the value of this configuration in TiQ -- with a "supported tag" you would enter this value on in the "tags" tab UI for each site profile.  Where would I enter this value for each site if I was using a data source?

Highlighted

Is it possible to have vendor config fields with a tealium custom container?

Tealium Employee

you would set the configuration value in an extension like a set data value extension and scope it to the tag.

 

Google ChromeScreenSnapz198.jpg

Highlighted

Is it possible to have vendor config fields with a tealium custom container?

Rookie Contributor

Is there any way to accomplish this without having to re-create the same extension on every site profile that uses this library?  If I create the extension on the library itself, it doesn't let me override the value when that extension is inherited into the site profile (it tells me "This is an imported extension, and can only be modified from lib-xxx library.").  I'd rather use a lookup table than have to create a separate extension for every profile, but again that's not ideal either.

 

To reiterate, it's very convenient with a supported tag, b/c the inherited tag on the site profile allows you to enter configuration overrides right on the "tags" tab without having to create multiple copies of the tag -- is there no similar functionality for custom containers besides clumsy lookup tables? 

Highlighted

Is it possible to have vendor config fields with a tealium custom container?

Tealium Employee

@erik_kallevig The custom container does not provide for the config setting you are use to in the UI of other marketplace tags.  

 

You can include the logic and code to set the configuration in the template code itself for each profile it loads into.

 

or in an extension scoped to the tag and mapped to a destination.

 

or you can set a value in an extension scoped to 'all tags' in the profile and then pick that up in the template code:

 if (typeof b.some_configuration_value  !== "undefined" && b.some_configuration_value !== "") {

someVendorObject.configurationValue = b.some_configuration_value ;
}