In Part 1 of the Facebook Dynamic Product Ads Ultimate Guide we covered the basics of dynamic ads – what they are and why you should be running them.
In part 2 we’ll show you exactly how to set them up like a pro.
So roll up your sleeves and follow along, we’ve got work to do!
The two primary components you need in place to run Facebook Dynamic Product Ads are:
- Facebook Pixel
- Product Feed
Let’s tackle the Facebook Pixel first.
The pixel is a snippet of code you install on your site that anonymously tracks visitors on your site and the actions they take.
The three primary advertising features the pixel enables are:
- Conversion Tracking – See how your ad is performing by seeing what actions website visitors took as a direct result of your ads
- Optimization – Automatically optimize your ads toward people more likely to convert on your site
- Remarketing – Serve highly targeted ads to people on Facebook after they leave your site without converting and get them to come back
The pixel setup has three main parts:
- Create your pixel
- Install your pixel
- Customize your pixel for dynamic ads
Create your pixel
If you haven’t created a Facebook Pixel or don’t know if you have one or not, follow our step-by-step instructions.
Install your pixel
The next step is to install the Facebook pixel on your website. Find out what ecommerce platform you’re using before going to the next step. If you’re using one of the more popular platforms, the pixel installation will be a snap. Just follow our easy instructions for the platform you’re using:
If you are not using one of those four platforms, don’t worry! Follow the steps below, send them to your web developer, or reach out to us for a custom pixel installation.
- Locate the header code of your website. You’ll be looking for the <head></head> tags.
- Copy your entire Facebook Pixel code and paste it in the header of your website. The code should go on every page of your website.
- Install the Facebook Pixel Helper plugin and ensure that the code is working properly
If you aren’t using one of the four ecommerce platforms above with a direct integration, go on to the next step where we’ll customize the pixel code on your site.
Customize your pixel for dynamic ads
In order for dynamic ads to work properly, your website needs to send info about your website visitors’ actions on your site so that Facebook knows whether to show them an ad or not and what content to include in the ads. These actions are sent using what Facebook calls Standard Events. You’ll notice that the base pixel code you installed earlier includes the line:
fbq('track', 'PageView');
This is the ‘PageView’ event that logs page views for every page across your site. You can use this to build Custom Audiences and track Custom Conversions throughout your site.
In order to run Dynamic Ads, you need to add 3 more standard events that correspond to 3 types of website visitor actions:
- ViewContent – when a visitor views a product page
- AddToCart – when a visitor adds a product to their cart
- Purchase – when a visitor completes a purchase on your site
Each of these standard events need to be sent with additional dynamic parameters giving Facebook more detail about the action the user completed. There are specific details for each event
- ViewContent
- content_ids (required): the product ID or product group ID of the page the visitor is on
- content_type (required): either “product” or “product_group”. Use “product” for an individual product or SKU. Use “product_group” when you have a product page with multiple variations – for example, a shirt that includes multiple SKUs for the various shirt sizes.
- value (highly recommended): send the product price as a number without currency info
- currency (required if passing value): format as the currency abbreviation. Example: ‘USD’
- AddToCart
- content_ids (required): the product ID or product group ID of the page the visitor is on
- content_type (required): either “product” or “product_group”. Use “product” for an individual product or SKU. Use “product_group” when you have a product page with multiple variations – for example, a shirt that includes multiple SKUs for the various shirt sizes.
- value (highly recommended): send the product price as a number without currency info
- currency (required if passing value): format as the currency abbreviation. Example: ‘USD’
- Purchase
- content_ids (required): the list of product IDs or product group IDs in the purchase
- content_type (required): either “product” or “product_group”. Use “product” for an individual product or SKU. Use “product_group” when you have a product page with multiple variations – for example, a shirt that includes multiple SKUs for the various shirt sizes.
- value (required): the total amount of the items purchased
- currency (required): format as the currency abbreviation. Example: ‘USD’
Once these events have been installed on your site, check them using the Facebook Pixel Helper plugin to ensure that the code is working properly. You should see something like this on a product page:
Now that the pixel is set up and passing dynamic events, let’s create the Facebook Product Feed.
Now let’s create your Facebook Product Feed
The product feed setup consists of a Product Catalog, Catalog Feeds, and Product Sets.
The catalog is a structured data file containing details on all the products in your store that you’d like to advertise on Facebook. Facebook uses this data to insert the dynamic fields like “product name” and “product image” into your ads. The supported feed formats are:
- CSV – Sample Feed
- TSC – Sample Feed
- RSS XML – Sample Feed
- ATOM XML – Sample Feed
For the sample feeds above, right click and select Save Link As in order to download and view the sample feeds.
Your feed can be formatted in any of the above formats but must include all of the following fields:
Optional fields we recommend using if you have them available:
Once you have your feed created, it’s time to upload it to Facebook and sync it with your pixel.
Go to the Product Catalog Settings page of Facebook Business Manager.
Click Add New Product Catalogs > Create Catalog:
Associate the catalog with your newly customized Facebook Pixel:
Click Add Product Feed
Option 1: If your feed was manually created and is in CSV or TSV format, choose “Single Upload”
Upload your file
Check for issues and if none are present, click Create Feed
Option 2: If you have a feed in RSS or XML format and it gets automatically updated by your ecommerce platform, choose “Schedule Recurring Uploads” to add your feed.
Advanced: If you have multiple categories of products and you want to advertise them separately, use Product Sets to distinguish them in your feed
Whew, are you still with me? Well then pat yourself on the back! That was the most technically challenging part of the Facebook Dynamic Product Ads setup and if you made it through this, you’ll have no problem with the rest of the setup.
Keep your eye out for Part 3 of the series – Campaign Creation and Optimization.
Roey
Hi,
First of all, great guide.
There is one thing i dont understand about the events, when i add the content id to the view content event, how can he know the content id automatically?
Thank you
Chris Root
Hi Roey – good question. What CMS are you using? Most have integrations that will dynamically populate the content id on each product page for you. If you’re doing it manually, you’ll want to set up the code to dynamically insert a unique id for each product. That could be a product id, SKU, etc. It just needs to be something unique for each product that you can reference later in the product feed so that Facebook can match products from your website to products in your feed.
Hope that helps, feel free to reach out through our contact form if you have more questions, happy to help further!
Ivan
Hello,
Can I use a url tracking in the link column for the feed? I need to track specific products that were visited or clicked on.
Chris Root
Hi Ivan – yep you sure can. If you are creating your own product feed from scratch, you can use any URLs in the link column. Alternatively you can add click or view tags in the ad template itself if you’re tracking through Google Analytics or another third party tracking software. Hope this helps! Feel free to reply here reach out via our contact form if you have any additional questions.