- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
01-24-2017 11:29 AM
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:
u.data.google_conversion_label = "##UTVARconfig_label##";
u.data.google_conversion_value = "##UTVARconfig_value##";
01-24-2017 02:56 PM
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:
u.data.order_id = u.data.order_id || 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(u.map)) { if (b[d] !== undefined && b[d] !== "") { e = u.map[d].split(","); for (f = 0; f < e.length; f++) { u.data[e[f]] = b[d]; } } } /* End Mapping Code */
Hope this information helps!
Copyright All Rights Reserved © 2008-2023