- 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
Dynamic Ads are a retargeting service that provides product recommendations to your visitors based on the products that they have interacted with. (Learn more).
This article describes how to provide Facebook with data about the products a visitor interacted with in order for Facebook to take action on those events.
In this article:0
The steps describes in this article assume that you already have a Facebook account and that you have set up your Product Catalog in the Facebook Business Manager. This step allows Facebook to accurately retarget events based on the products a visitor has shown interest in. (Learn more).
First, you will need to add the Facebook tag in TiQ. (Learn more).
If you have already added the Facebook tag, you can use that one. It is not required to add another instance.
Ensure that you are using the latest version of the Facebook tag template. To check what version you are on, use the Tag Status Checker. If it is not the latest version, update your template.
The Dynamic Ads service requires you to fire the following three (3) Facebook events:
The ViewContent event indicates that a visitor viewed a product and is typically fired on a product detail page. At a minimum, you must provide the content_ids
and content_type
parameters with this event for Dynamic Ads, as described below.
A ViewContent event is usually associated with the viewing of a product, which can be tied to a page load. For this reason, it is useful to examine the data sources present when the page load occurs.
Use the following steps to set up the mapping for the ViewContent event:
page_type
is used.page_type
value for the product page.
Save and publish your changes to save your settings.
The AddToCart event indicates that a visitor added a certain product to their cart or shopping basket. This event also requires content_ids
and content_type
parameters for Dynamic Ads, as described below.
The action of adding an item to a cart is typically tied to a button click on a product page. In order to fire an AddToCart event, you must key off of the value of a data source for that event. In this example, the event_name
data source is used.
Use the following steps to set up the AddToCart event:
Select the data source that indicates when an AddToCart event fires.
In this example, event_name
is used.
Click the Events tab.
In the Trigger field, enter event_name
value for an add-to-cart event.
In this example, “cart add” is used.
From the Event drop-down list, select AddToCart.
Click + Add.
An orange text field displays with your mapping.
Click Close to submit your mapping.
Save and publish your changes to save your settings.
You do not have to set up a mapping for the Purchase event if you already have the E-Commerce extension set up with the order ID mapped. If you have the e-commerce extension configured, the purchase event will automatically fire when an order ID is populated. (Learn more).
If you do not have the E-Commerce extension, set up the Purchase event using theViewContent event setup steps as a guideline. Use a mapping based off of page_type
equaling “order confirmation” as an example.
Each of these events requires that you send certain parameters, namely content_ids
and content_type
. Setting up additional parameters such as value
, content_name
, and currency
can help inform your analytics with more meaningful data. If you have the E-Commerce extension set up, these data sources will be automatically mapped for you.
The content_ids
parameter contains the IDs or SKUs of the products viewed by your visitor. If you have the e-commerce extension configured, these parameters are mapped and populated by the data source you selected for the List of Product IDs field in the extension. (Learn more).
If you do not have the E-Commerce extension or you want to use another data source, map a data source to the content_ids
parameter for each of the three (3) events.
The content_type
parameter indicates to Facebook whether the content/product IDs signify a single product or a group of products. You must set this parameter to either “ product
” or “ product_group
”, respectively. To accomplish this, use the Set Data Value extension..
This requirement is specific to Facebook. It is unlikely you already have a data source that is doing this for you.
Use the following steps to set content_type
with a Set Data Value extension:
Add a Set Data Value extension. (Learn more).
Use a descriptive title such as “Facebook: Setting content_type”.
Set the scope of the extension to your Facebook tag.
This extension is only needed for the Facebook tag and only needs to run when the Facebook tag loads.
To create a data source, click the plus (+) button next to the Set drop-down list.
Use a meaningful name for the data source, such as “fb_content_type”.
The purpose of this data source is to provide the value for content_type
.
In the To: field, ensure that Text is selected.
Enter “product” or “product_group” in the text field.
An extension that sets a data source with the proper value for content_type is now created.
To add this new data source in mapping for the Facebook tag, click the Data Mappings tab.
From the Data Sources drop-down list, select your “ fb_content_type
” data source.
Click the Parameters tab.
This allows you to set up the parameter mappings for the event of your choice.
From the Event drop-down list, select the first event that you want to map content type to, starting with ViewContent
.
From the Parameter drop-down list, select Content Type.
Click + Add\.
A blue text field displays in the Mappings dialog indicating that your mapping was successful.
Repeat the steps above for the AddToCart
and Purchase
events.
Click Close.
Click Apply to submit your mappings.
Save and publish your changes to save your settings.
Facebook provides the Facebook Pixel Helper browser extension in Chrome. Adding this extension to your Chrome browser will provide information on the events that fired on a page, what parameters the events contained, and errors detected by Facebook. (Learn more).
Copyright All Rights Reserved © 2008-2021