- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
With the basic installation of the Tealium Cartridge, Tealium automatically gathers a rich set of visitor event data, including content navigation, search tracking, product viewing, checkout and order tracking, all without any further customization.
Then, Tealium iQ unlocks the potential of the marketer by providing seamless and complete vendor tag integration without the need for IT resources, or Commerce Cloud Storefront changes.
Follow these directions to integrate the Tealium Cartridge into your Commerce Cloud Storefront. These steps are based on a standard Site Genesis storefront.
Tealium_Meta.xml
file: ./int_tealium/metadata/Tealium_Meta.xml
Tealium_Meta.xml
file./cartridge/templates/default/components/footer/pageFooter.isml
<isinclude url="${URLUtils.url('Tealium_utag-RenderTealium',
'title', request.pageMetaData.title,
'pagecontexttype', ('pageContext' in this && !empty(pageContext)) ? ''+pageContext.type : null,
'pagecontexttitle', ('pageContext' in this && !empty(pageContext)) ? ''+pageContext.title : null,
'searchterm', request.httpParameterMap.q.stringValue,
'searchresultscount', (!empty(pdict.productSearch) ? ''+pdict.productSearch.count : null),
'productid', (!empty(pdict.product) && !empty(pdict.product.id) ? ''+pdict.product.id : null),
'pagecgid', request.httpParameterMap.cgid.stringValue,
'orderno', (!empty(pdict.order) ? pdict.order.orderNumber : null)
)}"/>
/cartridge/templates/default/cart/cart.isml
.<isscript>var pageContext={title:'Cart', type:'cart', ns:'cart'};</isscript>
/cartridge/templates/default/checkout/checkout.isml
.<isscript>var pageContext={title:'Checkout',type:'checkout',ns:'checkout'};</isscript>
/cartridge/templates/default/account/order/history.isml
.<isscript>var pageContext={title:'OrderHistory',type:'orderhistory',ns:'orderhistory'};</isscript>
Be sure to configure the proper Tealium account and Tealium profile in the Tealium settings, as specified in steps 3 from the Setup section above.
No other Commerce Cloud configuration required.
Discuss with your Tealium Account Manager on how to customize your marketing tags using Tealium iQ.
For the basic integration, no custom code beyond the Setup steps defined above are required.
For legacy installations before the latest SFRA updates, view and download the older versions in GitHub found here: https://github.com/Tealium/integration-demandware/releases
The Tealium iQ console can now be used to manage your marketing tags, without requiring IT intervention. Please see your Tealium Account Manager for more details.
The Tealium Cartridge is designed to collect the same level of user behavior as that of traditional web analytics vendors. The Tealium Cartridge can be customized to increase or decrease the level of data collected in order to fully respect the privacy policy of the Commerce Cloud client.
Please contact your Tealium Account Manager for any needed support.
Once deployed, the most effective test to ensure a proper deployment is to view the page source of your storefront from within your browser. Your footer should now contain a JSON structure set to a variable named utag_data
. Simply search for this variable for confirmation. There is an additional script to include the utag.js file just below this.
The script block on every page will be as follows. The Tealium ACCOUNT, PROFILE and ENVIRONMENT values should match what was configured in Setup - Step 3.
<script type="text/javascript">
(function(a,b,c,d){
a='//tags.tiqcdn.com/utag/ACCOUNT/PROFILE/ENVIRONMENT/utag.js';
b=document;c='script';d=b.createElement(c);
d.src=a;d.type='text/java'+c;d.async=1;
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
})();
</script>
On the Home page, the data layer is minimal.
<script type="text/javascript">
var utag_data = {
"page_name": "SiteGenesis Online Store",
"page_type": "content",
"page_context_type": "storefront",
"page_context_title": "storefront",
"user_anonymous": "true",
"user_authenticated": "false",
"user_registered": "false",
"customer_id": "abZAaNVUFZJNZz7PUAZrRjr1E5"
};
</script>
Search results page adds new data points “search_results” (count) and “search_term” (keyword) used.
<script type="text/javascript">
var utag_data = {
"page_name": "Sites-SiteGenesis-Site",
"page_type": "search",
"page_context_type": "search",
"page_context_title": "product search results",
"user_anonymous": "true",
"user_authenticated": "false",
"user_registered": "false",
"customer_id": "abZAaNVUFZJNZz7PUAZrRjr1E5",
"search_results": "7",
"search_term": "suit"
};
</script>
On the “Product Detail” page, we expect page_type as “product.” The “product_XX” array values all have a single string value. Note that a “null” string value may indicate product catalog database is incomplete in Commerce Cloud. These values below are sample values. Most likely only page_type and page_context_type will be the same for your site.
<script type="text/javascript">
var utag_data = {
"page_name": "Platinum Blue Stripes Easy Care Fitted Shirt ",
"page_type": "product",
"page_context_type": "product",
"page_context_title": "platinum blue stripes easy care fitted shirt",
"user_anonymous": "true",
"user_authenticated": "false",
"user_registered": "false",
"customer_id": "abZAaNVUFZJNZz7PUAZrRjr1E5",
"product_id": [
"008884303989"
],
"product_sku": [
"null"
],
"product_name": [
"Platinum Blue Stripes Easy Care Fitted Shirt "
],
"product_brand": [
"null"
],
"product_category": [
"womens-clothing-tops"
],
"product_unit_price": [
"75.00"
]
};
</script>
This shows multiple product-specific coupons applied to both items in the cart. Discount is total discounted amount for all items of same product id.
<script type="text/javascript"> var utag_data = { "page_name": "Sites-SiteGenesis-Site", "page_type": "checkout", "page_context_type": "cart", "page_context_title": "cart", "user_anonymous": "true", "user_authenticated": "false", "user_registered": "false", "customer_id": "abZAaNVUFZJNZz7PUAZrRjr1E5", "coupon_codes": ["FIVEOFF"],
"product_id": [ "750518894553", "sanyo-dp50747" ], "product_sku": [ "null",
"null"
],
"product_name": [ "Charcoal Single Pleat Wool Suit", "Sanyo 50\" LCD High Definition Television" ], "product_brand": [
"null",
"Sanyo"
],
"product_category": [ "mens-clothing-suits", "electronics-televisions-flat-screen" ], "product_unit_price": [ "299.99",
"2996.25"
],
"product_quantity": [ "1", "5"
],
"product_coupon_discount": [ "-5",
"-25"
],
"product_coupon_promo": [ "FIVEOFF", "FIVEOFF"
]
};
Order Thank You page shows the details about the order and adds all values beginning “order_”. This data layer also includes all of the items that were purchased. The “product_” arrays should have the same number of items in each array and each item corresponds to the item in the same position in the other arrays.
<script type="text/javascript"> var utag_data = { "page_name": "confirmation", "page_type": "checkout", "page_context_type": "orderconfirmation", "page_context_title": "order confirmation", "user_anonymous": "true", "user_authenticated": "false", "user_registered": "false", "customer_id": "abZAaNVUFZJNZz7PUAZrRjr1E5", "order_id": "00000451", "order_discount": "0.00", "order_subtotal": "75.00", "order_tax": "4.05", "order_shipping": "5.99", "order_payment_type": "BML", "order_total": "85.04", "order_currency": "USD", "order_postal_code": "92868", "product_name": [ "Platinum Blue Stripes Easy Care Fitted Shirt " ], "product_brand": [ "null" ], "product_unit_price": [ "75" ],
"product_sku": [ "null" ], "product_id": [ "008884304023" ], "product_category": [ "womens-clothing-tops"
], "product_quantity": [
"1" ],
"product_coupon_discount": [ "0" ],
"product_coupon_promo": [ "" ]
};
</script>
Order History shows the details about previous or outstanding orders. This data layer should *not* include all of the items that were previously purchased.
<script type="text/javascript"> var utag_data = { "page_name": "Sites-SiteGenesis-Site", "page_type": "content", "page_context_type": "orderhistory", "page_context_title": "order history", "user_anonymous": "false", "user_authenticated": "true", "user_registered": "true", "customer_id": "adtkksWZjpbo9fdawQex7njjMb", "customer_email": "xxxxxxxxxx@yahoo.com" }; </script>
Copyright All Rights Reserved © 2008-2023