- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog Blog
- Support Desk Support Desk
Tealium Search Engine Optimization (SEO) tag adds JSON-LD format data to your pages which allows search engines (i.e. Google) to customize the way search results are displayed for your site. This article describes how to set up the tag in Tealium iQ.
First, go to the tag marketplace and add the Tealium SEO Tag to your profile (learn more about how to add a tag).
After adding the tag, configure the below settings:
http://query.example.com/search?q=smartphones
. Replace the value of "smartphones" with "search_term_string" so the final URL becomes:http://query.example.com/search?q=search_term_string
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 destination variables for the Tealium SEO Tag are built into its data mapping tab. Available categories are:
Destination Name | Description |
---|---|
Site Name | Your company or site name |
Homepage URL | The complete homepage URL |
List of Breadcrumb Names | Array of breadcrumb names |
List of Breadcrumb URLs | Array of breadcrumb URLs |
Custom JSON-LD Data |
Sets a specific value in the JSON-LD object. Add custom data by replacing "custom" with your data name. Supports dot notation nesting e.g. |
Custom JSON-LD data is created using data mappings and dot-notation naming. You will need to know what the final JSON-LD should look like in your page in order to determine the mappings. Let's use the example of creating a contactPoint
object.
In the final JSON-LD, the contactPoint object might look like this:
<script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "url" : "http://www.example.com", "contactPoint": { "@type": "ContactPoint", "telephone": "+1-888-555-1212", "contactType": "sales" } } </script>
In the tag, the entire object is represented by the json_ld
name in the data mappings. From there, each item within the final object is referenced by using dot-notation. For example, to set all of the values from the example above, you would create the following data mappings:
json_ld.@context
json_ld.@type
json_ld.url
The tag will create sub-objects within the final JSON-LD based on the dot-notation structure you specify in the mappings. To create the contactPoint
object in the example above, create data mappings with contactPoint
at the second level and each property at the third level:
json_ld.contactPoint.@type
json_ld.contactPoint.telephone
json_ld.contactPoint.contactType
In this case, let's assume you have a data layer variable named contact_phone
that contains the phone number to set within the contactPoint telephone property.
First, create a data mapping for contact_phone
and select the Custom JSON-LD Data destination.
Second, click the json_ld.custom
name to edit it, then change the value to json_ld.contactPoint.telephone
.
The final data mappings might look like this, depending on the names of your variables:
Since the Tealium SEO Tag is e-commerce enabled, it will automatically use the default E-Commerce Extension mappings. Manually mapping in this category is generally not needed unless:
Use the following mappings if Build Product Data is set to Yes.
Destination Name | Description |
---|---|
List of Product Names | Array of product names. |
List of Product Brands | Array of product brands. |
List of Product SKUs | Array of product SKUs. |
List of Prices | Array of prices. |
List of Product Image URLs | Array of image URLs. |
List of Product Part Numbers | Array of product part numbers. |
List of Product Rating Values | Array of product ratings. |
List of Product Review Counts | Array of product review counts. |
List of Product Descriptions | Array of product descriptions. |
Product Price Currency | Array of product currency. |
Custom JSON-LD data is created using data mappings and dot-notation naming. You will need to know what the final JSON-LD should look like in your page in order to determine the mappings. Let's use the example of creating a contactPoint
object.
In the final JSON-LD, the contactPoint object might look like this:
<script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "url" : "http://www.example.com", "contactPoint": { "@type": "ContactPoint", "telephone": "+1-888-555-1212", "contactType": "sales" } } </script>
In the tag, the entire object is represented by the json_ld
name in the data mappings. From there, each item within the final object is referenced by using dot-notation. For example, to set all of the values from the example above, you would create the following data mappings:
json_ld.@context
json_ld.@type
json_ld.url
The tag will create sub-objects within the final JSON-LD based on the dot-notation structure you specify in the mappings. To create the contactPoint
object in the example above, create data mappings with contactPoint
at the second level and each property at the third level:
json_ld.contactPoint.@type
json_ld.contactPoint.telephone
json_ld.contactPoint.contactType
In this case, let's assume you have a data layer variable named contact_phone
that contains the phone number to set within the contactPoint telephone property.
First, create a data mapping for contact_phone
and select the Custom JSON-LD Data destination.
Second, click the json_ld.custom
name to edit it, then change the value tojson_ld.contactPoint.telephone
.
The final data mappings might look like this, depending on the names of your variables:
You can inject custom JSON objects using the JavaScript Code Extension scoped to this tag. The tag exposes a JavaScript utility function for adding custom objects called u.injectJSONLD()
. It takes one parameter, an array of objects.
Example of adding a ContactPoint Schema:
u.injectJSONLD([{ "@context": "http://schema.org", "@type": "Organization", "url": "https://www.example.com", "contactPoint": [{ "@type": "ContactPoint", "telephone": "+1-877-555-1212", "contactType": "Lead", "contactOption": "TollFree", "areaServed": "US" }] }]);
Copyright All Rights Reserved © 2008-2022