Highlighted

Curious to hear from and connect with anyone else that is leveraging their own native data object on their site for analytics and are passing it into utag_data object

joseph_brown
Visitor
joseph_brown
 
5 REPLIES 5

Curious to hear from and connect with anyone else that is leveraging their own native data object on their site for analytics and are passing it into utag_data object

Tealium Employee
Hi Joseph, We work with a client that already has some variables available via Channel Intelligence. We leverage and repurpose the variables for the other vendor tags. Here is an example of the data made available on the cart page: CI_CartID="5237177c-79ed6b05786a"; CI_Currency="USD"; CI_ItemIDs=["12345","09876"]; CI_ItemMfrNums=["",""]; CI_ItemNames=["Toothpick Holder","Carafe"]; CI_ItemPrices=["14.95","6.95"]; CI_ItemQtys=["1","1"]; CI_Shipping="0.00"; CI_Tax="0.00"; These variables are exactly the type of data that we look for and mimic our own suggest data object so it's easy to implement. However, it is not always this easy. There are a few other clients that have repurposed the SiteCatalyst s.products variable. The s.products variable is always formated as such: s.products="Category;Product;Quantity;Price;eventN=X"; Since we know this format never changes we can write custom code to loop through this variable and grab each data point to create a utag_data object that we can use. This is a medium type of implementation. Lastly, the most custom of all integrations we have integrated with is a client who wants link tracking but to set the data to be passed as an element attribute. Here is an example of the code from their HTML anchor tag with the data to be passed to Google Analytics set in the "analytics" attribute: < a class="some-class" target="" onclick="" href="/product/index.xhtml" analytics="{'type':'Banner','id':'tcm:123','internalname':'Product Information','engagementtype':'Connect'}" >Link Text< /a > In this case we use our jQuery onhandler extension to track the link click, but then we also use some custom code that loops through the analytics attribute and grab the name/value pairs to be injected into the utag_data object. Hopefully these three scenarios shed some light into the type of work we have done to integrate with custom data. Cheers, -Dan George

Curious to hear from and connect with anyone else that is leveraging their own native data object on their site for analytics and are passing it into utag_data object

joseph_brown
Visitor
joseph_brown
Thanks Dan. I am currently wrestling with a "custom implementation" our IT org is very fragmented so the one semi-centralized group developed a a single method to populate a universal JSON object on our page. We then pass the JSON object into the utag_data object. Most of the headaches are coming from the fact the JSON object has multiple levels so we flatten it out and this is where the problems happen. You can see a sample object below. When we flatten out our portlets object or events object we have some extensions that loop through portlet0, portlet1,portlet2 etc... I am thinking there might be a better way to handle this and was just curious if there is anyone else out there wrestling with a JSON object using multiple levels. I guess in short I could have just asked who else is using the Flatten JSON object extension. Best, -Joe Brown {"page": {"wlpdesktop":"Consumer", "wlppagelabel":"P12400299741316786111396", "wuid":"B6SDFAFAF7607E2352353254234E", "environment":"dev", "role":"ALL USERS,PA", "breadcrumb":"Home|Resource Center", "l1":"LFG", "l2":"Consumer Main Book", "l3":"Resource Center", "l4":"Retirement Planning", "l5":"Retirement Planning", "l6":"Resource Center", "l7":"Landing Page Content 2", "l8":"Resource Center Main Page Bottom"}, "events":[], "portlets":[ {"id":"portlet_HUB002543", "type":"content", "manifestId":"HUB002543", "contentIds":"HUB_000725"}, {"id":"portlet_HUB006602", "type":"content", "manifestId":"HUB006602", "contentIds":"HUB006601"}, {"id":"portlet_HUB002554", "type":"content", "manifestId":"HUB002554", "contentIds":"HUB002349,HUB002350,HUB002351,HUB002352"}, {"id":"portlet_HUB002907", "type":"content", "manifestId":"HUB002907", "contentIds":"HUB_000731"}, {"id":"portlet_HUB002539", "type":"content", "manifestId":"HUB002539", "contentIds":"HUB_000730,HUB002001,HUB002002,HUB007801,HUB002003,HUB002004,HUB002005"} ]}

Curious to hear from and connect with anyone else that is leveraging their own native data object on their site for analytics and are passing it into utag_data object

Tealium Employee
I have not personally dealt with a client using the Flatten JSON Extension as I usually advise clients to use arrays instead. Taking what you supplied, our Flatten JSON Extensions will output the following: { events.array-size=0 page.breadcrumb="Home|Resource Center" page.environment="dev" page.l1="LFG" page.l2="Consumer Main Book" page.l3="Resource Center" page.l4="Retirement Planning" page.l5="Retirement Planning" page.l6="Resource Center" page.l7="Landing Page Content 2" page.l8="Resource Center Main Page Bottom" page.role="ALL USERS,PA" page.wlpdesktop="Consumer" page.wlppagelabel="P12400299741316786111396" page.wuid="B6SDFAFAF7607E2352353254234E" portlets.array-size=5 portlets0.contentIds="HUB_000725" portlets0.id="portlet_HUB002543" portlets0.manifestId="HUB002543" portlets0.type="content" portlets1.contentIds="HUB006601" portlets1.id="portlet_HUB006602" portlets1.manifestId="HUB006602" portlets1.type="content" portlets2.contentIds="HUB002349,HUB002350,HUB002351,HUB002352" portlets2.id="portlet_HUB002554" portlets2.manifestId="HUB002554" portlets2.type="content" portlets3.contentIds="HUB_000731" portlets3.id="portlet_HUB002907" portlets3.manifestId="HUB002907" portlets3.type="content" portlets4.contentIds="HUB_000730,HUB002001,HU...003,HUB002004,HUB002005" portlets4.id="portlet_HUB002539" portlets4.manifestId="HUB002539" portlets4.type="content" } So you can see we automatically loop through the "portlets" and apply the incremental length value. We also supply an ".....array-size" variable so the length is upheld. I would not advise going any deeper than the 2 levels shown. Tracking the length of each item starts to get very difficult when there are nested items. I hope this helps!

Curious to hear from and connect with anyone else that is leveraging their own native data object on their site for analytics and are passing it into utag_data object

joseph_brown
Visitor
joseph_brown
This is where we hit a bit of a snag. As an example I need to get all the contentIds into a list prop. We had to create an extension to loop through and join all the values and store it in a single variable to pass along to Omniture. It works but I was thinking there might be a better way to handle this.

Curious to hear from and connect with anyone else that is leveraging their own native data object on their site for analytics and are passing it into utag_data object

Tealium Employee
You are going the right route for now. This could possibly be done with the "Join Variables" extension, but the extension currently only handles joining 3 variables. I know there is an enhancement ticket submitted to have this changed. You could always use multiple join variable extensions together to accomplish the same feat.