Using Tealium reference variables in templates (hash coded varaibles)

Gold Contributor
Gold Contributor

I'm editng a Custom Container Tag in IQ, and was hoping to pull variables from the enhanced ecommerce extension as many of the marketplace tags do.  How do i do so?

I noticed in other templates there are Hashed variable placeholders and assume I use these - but want to make sure, and see if there's a available key of available hashed variable names and what they're for?

example: = "##UTVARconfig_label##"; = "##UTVARconfig_value##";


Using Tealium reference variables in templates (hash coded varaibles)

Employee Emeritus

Hi @Michael_Kim_shc,

The ## variables are taken from the vendor configuration section of the UI.  If you're wanting to utlize the ecommerce extenstion values, you would code something like this in the template: = || b._corder || "";

The above code will allow you to map in a data point to order_id and if that didn't happen, the code will pull from the ecommerce extensions _corder data point.  If both aren't available, an empty string will be added to the order_id data point.  Within the ecommerce extension, you will see the list of _c variable names that relate to each data point.

One thing to note when adding this code, make sure to do it after the following section in the template:

        /* Start Mapping Code */
        for (d in utag.loader.GV( {
          if (b[d] !== undefined && b[d] !== "") {
            e =[d].split(",");
            for (f = 0; f < e.length; f++) {
    [e[f]] = b[d];
        /* End Mapping Code */

Hope this information helps!