- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
12-11-2015 01:54 PM
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.
12-11-2015 02:46 PM
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 };
12-11-2015 03:21 PM - last edited on 12-11-2015 04:09 PM by kathleen_jo
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?
12-11-2015 04:41 PM
you would set the configuration value in an extension like a set data value extension and scope it to the tag.
12-15-2015 07:57 AM
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?
12-15-2015 05:05 PM - last edited on 12-16-2015 09:48 AM by kathleen_jo
@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 ;
}
Copyright All Rights Reserved © 2008-2023