Highlighted

Enabling e-commerce extension on a site with IBM NetInsight

I seem to be missing the link between the ecommerce extension and the usage of rtv/rta/rtc parameters in IBM NetInsight. I have in my UDO: var utag_data = { order_id:"123456789", order_type:"view", order_total:"18", order_retail:"20", product_id:["pid1","pid2"], product_name:["pn1","pn2"], product_sku:["prod1","prod2"], product_qty:["1","4"], product_up:["10","2"] } These get correctly translated to the _c prefixed variables in the UDO: { "_cbrand" : [], "_ccat" : [], "_ccat2" : [], "_ccity" : "", "_ccountry" : "", "_ccurrency" : "", "_ccustid" : "", "_corder" : "123456789", "_cpdisc" : [], "_cprice" : [ "10.00", "2.00" ], "_cprod" : [ "pid1", "pid2" ], "_cprodname" : [ "pn1", "pn2" ], "_cpromo" : "", "_cquan" : [ "1", "4" ], "_cship" : "", "_csku" : [ "prod1", "prod2" ], "_cstate" : "", "_cstore" : "", "_csubtotal" : "", "_ctax" : "", "_ctotal" : "", "_ctype" : "view", "_czip" : "" } First I noticed the empty variables which are 'normal' cause they do not exist in the UDO but should they actually exist and would this cause problems. My question is how to have the rtv parameter filled in and send correctly using this extension as the value for this parameter should be rtv=prod1;1;2,prod2,1,2... Is Tealium doing this automatically and if so what am I missing, if not what do I have to do in this case?
3 REPLIES 3
Highlighted

Enabling e-commerce extension on a site with IBM NetInsight

Tealium Employee
Hi John, I've had a look at the NetInsight tag code, and I can see that it does not currently support the e-commerce extension "out of the box" (it's one of the very few tags that doesn't). The chances are that this tag is not used by many other customers and we haven't been given an up to date implementation guide, meaning that it may not be in line with the current standards recommended by IBM. If you have a copy of the implementation guide, please forward this to your account manager or submit a support ticket so that we can get this reviewed for you and update the tag template if necessary. In the meantime, we can probably achieve what you want to do using an extension to convert the data into the correct format. Could you just confirm the exact format they are expecting? It wasn't clear from your example what ";1;2" mean following the product ID. Is this supposed to represent the product quantity? If you can clarify this, I can recommend the best type of extension to use. Look forward to your reply, Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Highlighted

Enabling e-commerce extension on a site with IBM NetInsight

Thank you for the response on this question. To clarify what NetInsight is expecting we can define 4 'actions' on e-commerce level: 1. product views (viewing products) 2. cart additions (add products to shopping cart) 3. cart removals (remove products from shopping cart) 4. checkouts (purchase is being made) For the product views NI is expecting the variable rtv with the following value: rtv=prod1234;prod3456;prod5678 which is a ; seperated list of product id/sku's. For the cart additions NI is expecting the variable rta with the following value: rta=â prod1234 ;1;10.00;prod5678 ;1;10.00' where you see here two product sku's added having a quantity of 1 and a price of 10.00 The cart removals are basically the same concept as the cart additions but the parameter name changes to rtr. The checkout process is identified using the rtc parameter and follows the same logic as cart additions and cart removals: rtc=prod1234;1;5.00;prod3456;3;19.95 But additional data can be added such as rtt (retail total revenue) and rti (retail order number) which should result in: "rti=ABC1234&rtt=199.99&rtc=prod1234;1;150;prod3456;1;49.99" I was testing the e-commerce extension but indeed nothing automagically happened. We might need to script a custom javascript extension that creates the proper variables from the UDO variables (with _c prefix) I suppose. best regards
Highlighted

Enabling e-commerce extension on a site with IBM NetInsight

Tealium Employee
That's great - thanks for the information, John. Does your data layer also contain events for cart addition/removal? Product views and the checkout event are going to be easy to track, but unless there's something in the data layer that tells us which action has been taken, it's going to be difficult to fire the cart addition/removal events. Here's how to convert the product arrays to the required format. On the product page (i.e. only product ID is required): * Create a data source for each of the parameters you wish to map (e.g. "ibm_rtv", "ibm_rtc"). * Use a "Set Data Values" extension to join the product array together. On the left hand side, select your new data source as the destination. Make sure the type is set to "JS Code" and in the text box type {code:javascript} b._cprod.join(";") {code} This will concatenate the _cprod array into a semicolon-delimited string. On the other pages where the qty and price are required, use a javascript code extension with the following contents: {code:javascript} //create an empty array b.ibm_rta = []; //loop through the product array for (var i = 0; i < b._cprod.length; i++) { //create an element for each product and join qty + price with semicolons b.ibm_rta.push(b._cprod[i] + ";" + b._cquan[i] + ";" + b._cprice[i]); } //join it all together with semicolon as the delimiter b.ibm_rta = b.ibm_rta.join(";"); {code} Finally, map your new variable to the relevant field in the tag. Hope that makes sense. Disclaimer: The code above is untested, so I recommend you test it on your dev environment before publishing to production! If you can still pass us the full implementation guide for the tag, we'll get it updated in the ecosystem so that the above is included as standard functionality. Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.