- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
This article shows how to set up the the MyBuys tag within Tealium iQ Tag Management. When using this guide it will be helpful to have your MyBuys Implementation Guide as a reference.
In this article:
First, go to the Tag Marketplace and add the MyBuys tag to your profile (see How to Add a Tag).
After adding the tag, configure the below settings:
MySite Recommendation Zone: The numeric zone number.
Global CSS Path: The default URL to the global MyBuys CSS (if used).
Client CSS Path: The URL to the client-specific CSS (if used).
Load Rules determine when and where to load an instance of this tag on your site.
Recommended Load Rule: All Pages.
Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For instructions on how to map a variable to a tag destination, see data mappings.
The following tables explain the different page types and events that MyBuys tracks and how the corresponding data is mapped within Tealium iQ. Your Universal Data Object should already contain the page_type
and event_name
variables.
MyBuys Page Type |
Tealium Page Type (page_type) |
Required/optional |
---|---|---|
Home | home | Required |
High Level Category |
section | Required |
Leaf Level Category |
category | Required |
Product Detail |
product | Required |
Search Results |
search | Required |
Add to Cart |
cart_add (event_name) | Required |
Shopping Cart and Checkout |
cart, checkout | Required |
Order Confirmation | receipt | Required |
Sale | sale | Optional |
New Arrivals | new_arrivals | Optional |
Brand Home | brand_home | Optional |
Brand | brand | Optional |
Landing Page | landing | Optional |
My Page | account | Optional |
Product Ratings | product_ratings | Optional |
Email Newsletter Signup | email_signup (event_name) | Optional |
The name of the page_type
variable might vary for your implementation. The mapping toolbox makes it easy to connect the Tealium page types to the MyBuys page types. When you map the page_type
variable, click on the "Page Types" tab, then enter the values populated in the Tealium UDO and select the corresponding MyBuys page from the drop-down menu.
The same type of mapping can be used to track events using the event_name
variable.
Sample Page Type and Event Name Mapping in Tealium iQ:
Map to these destinations for sending ecommerce–specific Data Layer variables. We typically recommend using Tealium's E-Commerce Extension for this purpose. Why? When it is properly configured, the Extension automatically maps your variables to the appropriate destinations for all E-Commerce enabled Tags in your profile. That way you don't have to map those variables over and over for every one of your Tag. If you, however, decide to override any Extension variable, or otherwise your variables are not available to the Extension, you must manually map a data source to its destination using the toolbox.
These MyBuys page types have the following variables associated with them. If these variables are mapped in the E-Commerce Extension then their values will be passed automatically to the MyBuys tag. Otherwise they will need to be mapped explicitly in the tag configuration. Please note that Tealium variable names may vary.
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
categoryId | category_id | Mapped |
addItemPresentOnPage |
product_on_page (Array) |
Mapped |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
categoryId | category_id | Mapped |
addItemPresentOnPage |
product_on_page (Array) |
Mapped |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
brandname | brand_name | Mapped |
addItemPresentOnPage |
product_on_page (Array) |
Mapped |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
addItemPresentOnPage |
product_on_page (Array) |
Mapped |
productId |
product_id (Array) |
E-Commerce |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
productId | product_id (Array) | E-Commerce |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
addItemPresentOnPage |
product_on_page (Array) |
Mapped |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
customer_email (defaults to customer_id) |
Mapped (E-Commerce) |
|
amount |
cart_total_value |
Mapped |
optin |
customer_optin |
Mapped |
addCartItemQtySubtotal |
cart_product_id,
cart_product_quantity, cart_product_price (Arrays) |
Mapped |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
customer_email (defaults to customer_id) |
Mapped (E-Commerce) |
|
amount |
cart_total_value |
Mapped |
optin |
customer_optin |
Mapped |
addCartItemQtySubtotal |
product_id, product_quantity, product_price (Arrays) |
E-Commerce |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
customer_email (defaults to customer_id) |
Mapped (E-Commerce) |
|
orderId |
order_id |
E-Commerce |
amount |
order_subtotal |
E-Commerce |
optin |
customer_optin |
Mapped |
addCartItemQtySubtotal |
product_id, product_quantity, product_price (Arrays) |
E-Commerce |
MyBuys Variable | Tealium Variable | Mapping |
---|---|---|
customer_email (defaults to customer_id) |
Mapped (E-Commerce) |
|
gender |
customer_gender |
Mapped |
zipcode |
customer_postal_code |
E-Commerce |
Sample MyBuys Variable Mapping in Tealium iQ:
MySite Recommendation Zones can be configured by specifying two settings: the DIV ID and the zone number. The DIV ID should reference the "id" attribute of an HTML tag in the page where the recommendations should appear. The zone number will match the numeric zone created for your MyBuys recommendations. It is recommended to have these HTML elements hard-coded onto the page to ensure proper placement.
Example:
<body>
...
<div id="mybuys1"></div>
...
</body>
To configure multiple zones per page, additional mappings are required for the "divs" and "zones" variables. The values of these variables should be arrays containing a list of DIV ID's and the matching zone numbers.
In this example, "mb_divs" and "mb_zones" have been defined as new variables and are set as arrays of their respective values using a Set Data Values extension. The arrays can be populated using the "JS Code" assignment option. Zones can be configured on a page-by-page basis by creating multiple extensions, each with a condition.
Example extension setting multiple zones on the product detail page:
Result:
// On the product page (when page_type equals "product")
b.mb_divs = ["mybuys1", "mybuys2", "mybuys3"] b.mb_zones = ["1", "2", "3"]
The MyBuys tag should behave identically inside of Tealium as it would outside of Tealium. The easiest way to verify that the MyBuys tag is working is to inspect the network traffic as the page loads. As Tealium loads and fires the MyBuys tag there will be several requests to the MyBuys servers to fetch the CSS files, the JavaScript code files, and ultimately the final pixel call containing the dynamic attributes.
Example Network Traffic of MyBuys Tag (As Seen in Chrome Developer Tools):
Copyright All Rights Reserved © 2008-2021