Categories
Digital Marketing Facebook Ads

Facebook Campaign Structure for Long-Term Success

Evergreen Campaigns

An Evergreen Campaign Structure doesn’t change much year over year: The Campaigns and Ad Sets are continually in use, and only the ad creative is changed.

Evergreen Campaigns add some structure and sanity to your Facebook Ad management. They prevent the typical disorganized Campaign sprawl that plagues most Facebook Ads Accounts. Evergreen Campaigns encourage continuous improvement and optimization, facilitates data analysis, and lowers maintenance costs.

Campaign Structure

The campaign structure is relatively simple: 3-4 primary campaigns targeting 3 main segments: Past Purchasers, Remarketing, and Prospecting.

Past PurchasersRemarketingProspecting
People who have previously purchased from you.People who have interacted with your brand via your website, social media, or otherwise, but have not purchased from you yet.People who have never purchased from you, and who have not interacted with your brand in the past 180 days.
CPA $CPA $$CPA $$$
Budget $$Budget $$$Budget $
Facebook Evergreen Campaign Structure

Audiences

Before you can create your campaigns, you will need to define some base audiences to capture purchasers and website visitors. A full description of the essential Facebook audiences that should be created is available here.

Building the Campaigns

Campaign #1: Past Purchasers

This campaign targets people who have previously purchased from you. Generally your cost per acquisition will be low, and your budget will be a function of how many customers you have.

Campaign NameBuying TypeObjective
Past PurchasersAuctionConversions

Ad Sets for Past Purchasers Campaign

At it’s most basic, the campaign contains a single Ad Set containing all your past customers:

Ad Set NameAudiences
Past Purchasers All TimePurchase 10d
Purchase 30d
Purchase 180d
Purchaser All Time

For high volume businesses that have large amount of customers, multiple Ad Sets could be create, one for each audience to have more granular control based on past purchase date. However, a single campaign targetting all past purchasers is also quite effective, trusting Facebook’s algorithm to take purchase recency into account.

Campaign #2: Remarketing

This campaign targets website visitors and people who have previously engaged with your brand on facebook, instagram, or otherwise, but who have NOT previously purchased from your business.

Your Cost per Acquisition (CPA) will be relatively low, and therefore you should manage to have a relatively large budget while maintaining a profitable CPA.

This campaign actually needs to be setup as two separate campaigns

Campaign NameBuying TypeObjective
RemarketingAuctionConversions
Dynamic RemarketingAuctionCatalog Sales
The Remarketing campaign needs to be split into two: one for regular ads, and another for dynamic product ads.

Ad Sets for Remarketing Campaigns

Ad it’s most basic, the Remarketing Campaign contains only two Ad Sets targeting visitors who engaged with your brand up to 30 days ago, and another for people who engaged with your brand up to 180 days ago (the Facebook maximum)

Ad Set NameAudiencesExclude
Remarketing 30dAdd to Cart 30d
Visitors Top 25% 30d
FB Engagement 30d
IG Engagement 30d
Purchase 30d
Remarketing 180dAdd to Cart 180d
Visitors Top 25% 180d
FB Engagement 180d
IG Engagement 180d
Purchase 180d
Add to Cart 30d
Visitors Top 25% 30d
FB Engagement 30d
IG Engagement 30d

For higher volume sites, you can consider adding more granular Ad Sets for 10, 60, 90 day etc… remarketing audiences.

Ad Sets for Dynamic Remarketing

Ad Set NameAudiences
Product View 30dRetarget Ads:
Viewed or Added to Cart
but not Purchased: 30d
Product View 180dRetarget Ads:
Viewed or Added to Cart
but not Purchased: 180d
Cart Abandon 30dCart Abandon 30d
Cart Abandon 180dCart Abandon 180d

For high-volume sites, or for periods of high sales such as Black Friday, you can also consider creating 10, 4, or even 1 day Ad Sets.

Campaign #3: Prospecting

This campaign will target “brand unaware” customers. People that have never purchased from you, and that have not interacted with your brand or site in at least 180 days.

This campaign will feed your Remarketing campaigns. You can expect your Cost per Acquisition (CPA) to be relatively high and your budgets will need to be relatively low to remain profitable. But the more you can manage to spend here, the more you will be able to spend on Remarketing.

Ad Sets for Prospecting Campaign

At it’s most basic, the prospecting Campaign should target a 1% look-a-like audience (based on the Purchase pixel event).

More advanced campaigns can also target 2%-10% look-a-like audiences, or custom interest based audiences. But it is important to always exclude your Past Purchasers and Remarketing audiences so that there is no overlap with your campaigns.

Ad Set NameAudiencesExclude
1% Look-a-like Purchase1% Look-a-like PurchasePurchase All Time
Purchase 180d
Add to Cart 180d
Site Visitors Top 25% 180d
FB Engagement 180d
IG Engagement 180d

The Big Picture

Once all the above is setup, your Campaign and Ad Sets should look something like this:

Facebook Ads Evergreen Campaign Structure
Facebook Ads Evergreen Campaign Structure

All that remains now is to create ads or duplicate your posts into these campaigns. But that is a topic for another day.

Related Reading

Categories
Digital Marketing Facebook Ads

Essential Facebook Audiences

Below is a list of the Essential Facebook Audiences the every e-commerce site should create in their Facebook Ads Account. Even if you don’t plan on using them right away, creating them now will ensure that you can serve ads to these users in the future.

Past Purchasers

Past Purchasers audiences will be used to target users that have previously purchased from you. There are 4 audiences with varying time periods, to allow you to target your past purchasers by how recently they purchased from you.

To create these go to
Audiences > Create Audience > Custom Audience

Audience NameSourcePixel Criteria
Purchase: 10 dayWebsitePurchase: 10 days
Purchase: 30 dayWebsitePurchase: 30 days
Purchase: 180 dayWebsitePurchase: 180 days
Purchase: All TimeCustomer ListCustomer list upload*
* The “Purchase: All Time” audience will need to be updated every 180 days.

Visitors and Social Fans

These audiences include website visitors, cart abandoners, and people who have engaged with your content on Facebook and Instagram. These are all people that are “brand aware” and are some of the lowest hanging fruit in terms of generating sales.

To create these audiences go to
Audiences > Create Audience > Custom Audience

Audience NameSourcePixel Criteria
Add to Cart: 1 dayWebsiteAddToCart: 1 day
Add to Cart: 4 dayWebsiteAddToCart: 4 days
Add to Cart: 30 dayWebsiteAddToCart: 30 days
Add to Cart: 180 dayWebsiteAddToCart: 180 days
Site Visitors: Top 25%: 10 dayWebsiteVisitors by Time spent:
Top 25%: 10 days
Site Visitors: Top 25%: 30 dayWebsiteVisitors by Time spent:
Top 25%: 30 days
Site Visitors: Top 25%: 180 dayWebsiteVisitors by Time spent:
Top 25%: 180 days
FB Engagement: 10 dayFacebookEveryone who engaged
with your page: 10d
FB Engagement: 30 dayFacebookEveryone who engaged
with your page: 30d
FB Engagement: 180 dayFacebookEveryone who engaged
with your page: 180d
IG Engagement: 10 dayInstagramEveryone who engaged
with your business: 10d
IG Engagement: 30 dayInstagramEveryone who engaged
with your business: 30d
IG Engagement: 180 dayInstagramEveryone who engaged
with your business: 180d

Lookalike Audiences

Lookalike audiences are a good base to use for new customer prospecting. If you target multiple countries, you will need to create a separate set of these for each country.

To create these audiences go to
Audiences > Create Audience > Lookalike Audience

Lookalike SourceEventNumber of
Audiences
Audience Markers
Facebook PixelPurchase40%, 1%, 2%, 5%, 10%
Choose 4 audiences, and set markers at 0%, 1%, 2%, 5%, and 10%

Next: Campaigns

Once you’ve created your audiences, the next step is to create a Facebook Evergreen Campaign Structure properly segmented into Past Purchasers, Remarketing, and New Customer Prospecting.

Related Posts

Categories
Digital Marketing Facebook Ads Shopify

Fix Missing Fields in Shopify’s Facebook Product Feed

Last Update: September 18, 2020

If you use the Facebook Channel on your Shopify store, you will notice that some product attributes are missing in the product catalog:

  • Google Product Category
  • Gender
  • Material
  • Additional Images

Below is the solution to add these missing details. This will give you finer control over your Facebook Product Sets and will let you create richer dynamic ads with multiple product images.

Pre-requisites

Before we start, make sure all of the following are done:

  1. Install the Google Sales Channel
    The script leverages some of the metafields that are created on by the Google Sales Channel
  2. Install the Facebook Sales Channel
  3. Setup Empty Field Rules
    This is not actually a pre-requisite, but it’s a good backup in case things break down with your feed. This sets some default values for fields such as condition and availability.
  1. Go to Facebook Business Manager and then
    Commerce Manager > Catalog > Data Sources
  2. Click on your data feed and go to Settings
  3. Scroll down to Data Feed Rules and click on Add Rules > Set Default Values
  4. Create default values for age_group, gender, availability, condition, material, and any other fields that make sense for your business.

Step 1
Create the Facebook Product Feed Template

To create the Facebook product update feed, we will use a “hack” to transform a standard Shopify Collection page into and XML data feed:

  • In the Shopify admin, go to
    Online Store > Themes > Action > Edit Code
  • Under Templates, choose Add a new Template
  • Choose collection from the drop down and name your template facebook-feed-template

Paste the code below into your newly created template file and click Save.

{% layout none %}<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
{%- paginate collection.products by 1000 -%}
{%- assign useSEOdescription = true -%}
{%- assign additionalImagesForVariants = false -%}
{%- assign filterVariantImagesByColor = false -%}
{% comment %}
This template is used to add additional information to the Facebook product catalog
</comment:title>
{% endcomment %}
<channel>
<title>{{ shop.name }} {{ collection.title | replace: '&', '&amp;' }}</title>
<link>{{ shop.url }}</link>
<description>{{ collection.description | strip_html }}</description>
{% for product in collection.products %}
{%- assign GoogleProductCategory = product.metafields.mm-google-shopping.google_product_category -%}
{%- assign Gender = product.metafields.mm-google-shopping.gender -%}
{%- assign AgeGroup = product.metafields.mm-google-shopping.age_group -%}
{%- assign Material = product.metafields.mm-google-shopping.material  -%}
{%- assign Color = "" -%}

{%- if product.variants.size > 0 -%}
{%- for variant in product.variants -%}
{%- for option in product.options -%}
{%- if option == 'Color' -%}{% capture Color %}{{ variant.options[forloop.index0] }}{% endcapture %}{%- endif -%}
{%- endfor -%}

{% assign additional_images = product.images %}
{% if filterVariantImagesByColor %}{% assign additional_images = product.images | where: "alt", Color | sort: 'attached_to_variant' | reverse%}{% endif %}

<item>
<g:id>{{ variant.id }}</g:id>
<g:brand>{{ product.vendor }}</g:brand>
{% if useSEOdescription and product.metafields.global.description_tag.size > 0 %}<description>{{ product.metafields.global.description_tag | strip_html | strip_newlines | replace: '&', '&amp;' }}</description>{% endif %}
<g:google_product_category>{{ GoogleProductCategory | replace: '&', '&amp;'  }}</g:google_product_category>
<g:item_group_id>{{ product.id }}</g:item_group_id>
<g:content_id>{{ variant.id }}</g:content_id>
<g:availability>{% if variant.available %}in stock{% else %}out of stock{% endif %}</g:availability>
<g:material>{{ Material }}</g:material>
<g:gender>{{ Gender }}</g:gender>
<g:age_group>{{ AgeGroup }}</g:age_group>
{% if additionalImagesForVariants %}
{% if additional_images.size > 1 %}{%- for image in additional_images offset:1 limit:10 -%}
<g:additional_image_link>https:{{ image.src | product_img_url: 'master' }}</g:additional_image_link>
{% endfor %}{% endif %}
{% endif %}
</item>

{% endfor %}
{%- else -%}

<item>
<g:id>{{ product.id }}</g:id>   
<g:brand>{{ product.vendor }}</g:brand>
{% if useSEOdescription and product.metafields.global.description_tag.size > 0 %}<description>{{ product.metafields.global.description_tag | strip_html | strip_newlines | replace: '&', '&amp;' }}</description>{% endif %} 
<g:google_product_category>{{ GoogleProductCategory | replace: '&', '&amp;'  }}</g:google_product_category>
<g:item_group_id>{{ product.id }}</g:item_group_id>
<g:availability>{% if product.available %}in stock{% else %}out of stock{% endif %}</g:availability>
<g:material>{{ Material }}</g:material>
<g:gender>{{ Gender }}</g:gender>
<g:age_group>{{ AgeGroup }}</g:age_group>
{% if product.images.size > 1 %}{%- for image in product.images offset:1 limit:10 -%}
<g:additional_image_link>https:{{ image.src | product_img_url: 'master' }}</g:additional_image_link>
{% endfor %}{% endif %}
</item>

{% endif %}
{% endfor %}
</channel>
</rss>
{% endpaginate %}

or download from Github

Although the script above will work as is, there are two items that you can configure:

additionalImagesForVariants = false
Setting this to true will upload all your product’s additional images. If you use variants, all your variants will have the identical additional images (their primary image will be as-configured in Shopify)

filterVariantImagesByColor = false
Setting this to true will only upload additional images for a variant IF the ALT text of the images exactly match that variant’s color attribute.

Step 2
Select the Products to Send to Facebook

Now select which products will be included in your feed.

  • In Shopify Admin, go to
    Products > Collections > Create Collection
  • Enter a Title: “Facebook”
  • Add Products to the collection (either manually or using conditions). If you want to include all your products, then add a rule similar to “Inventory Stock is greater than 0”.
  • IMPORTANT!
    Assign the Facebook Feed Template to this collection.
    In the bottom right column of the page, you should see a section called Theme templates. Choose collection.facebook-feed-template otherwise none of this will work.
  • At the bottom of the page, click on Edit Website SEO and enter “facebook” as your collection url handle. (optional – but helps with remembering your feed url)
  • Save and Preview the collection. You should see unformatted text on the screen. This is your Facebook feed. Do a “View Source” in your browser to preview the XML data.
  • Copy the url of this page. It should look similar to https://www.yourstore.com/collections/facebook

Step 3
Upload your Product Feed to Facebook

  • Go to your Facebook Business Manager and go to Commerce Manager
  • Expand Catalogs in the left hand menu and select Data Sources
  • Click on your data source name and then on Settings
  • Scroll to the bottom of the screen and click on Update Schedule and choose Hourly
  • Paste in the feed url generated in Step 2 and click Save
  • Click Request Update Now
  • Wait for Facebook to finish fetching your feed

Done

Your products should now have the missing information added. You will probably want to repeat STEP 3 anytime you modify or add new products to your shop.

It’s just a matter of time before Shopify starts uploading the full data specs to Facebook, but until that time, this is the workaround!

Related Reading

Categories
Digital Marketing Facebook Ads

How to Adjust and Scale Facebook AdSet Budgets

This article describes a simple systematic approach to adjusting and scaling your Facebook Ad Set budgets.

Some assumptions:

  1. You are using daily budgets at the Ad Set level
  2. You have an ROI focused e-commerce business
  3. You are tracking sales and know your incremental profit margins
  4. You have a well defined Ad Set structure that changes infrequently
  5. You are adjusting budgets at most once per day, and ideally only once a week. (If adjusting budgets hourly, a different approach needs to be taken)

The General Approach

  1. Determine an acceptable ROAS range. (eg: Between 3.0 and 5.0 ROAS)
  2. Review and adjust budgets once per week.
  3. If your ROAS is below the minimum range, decrease budgets by 10%
  4. If your ROAS is above the maximum range, increase budgets by 10%
  5. Do NOT increase budget if the frequency is greater than 10
  6. Do NOT decrease budget if the total cost is very low
  7. If ROAS is 0 but cost is high, decrease budget by 10%
  8. Consider multiple time periods when deciding on budget adjustments

Increasing Budgets

  1. Set your date window to the last 7 days
  2. SELECT any Ad Sets with an ROAS greater than 5.0
  3. UNSELECT any Ad Sets that have a frequency > 10
  4. Change date window to 30 days (your previous selections will remain)
  5. UNSELECT any Ad Sets with an ROAS less than 5.0
  6. Edit > Edit Budget and increase budgets of the remaining Ad Sets by roughly 10%

Decreasing Budgets

  1. Set your date window to the last 7 days
  2. SELECT any Ad Sets with an ROAS lower than 3.0
  3. SELECT any Ad Sets with an ROAS of 0.0, and a total spend of more than 100% of average order value.
  4. Change date window to 30 days (your previous selections will remain)
  5. UNSELECT any Ad Sets with an ROAS greater than 3.0
  6. UNSELECT any Ad Sets that have zero sales, and a total spend less than 50% of average order value.
  7. Edit > Edit Budget and decrease budgets of the remaining Ad Sets by roughly 10%

ROAS and Cost of Sales Targets

It is important to know your profit margins, and to determine what percentage of your sales you are willing to spend to acquire a customer.

For past customers and remarketing audiences, I like to keep cost of sales below 30%, and ideally around 20%. (eg: If I sell a $100 product, I want my cost of acquisition to be below $30; and ideally around $20). This translates to a ROAS of between 3.0 and 5.0.

For new brand unaware audiences, I am willing to spend more to introduce that customer to our product. In these cases, I am willing to spend up to 50% of sale price. This is an ROAS of 2.0.

AudienceTarget Cost of SalesMinimum ROASTarget ROAS
Past Customers20%-30%3.05.0
Remarketing20%-30%3.05.0
Prospecting30%-50%2.02.5
Categories
Facebook Ads Shopify

DIY Facebook Product Feed for Shopify

WARNING! I am no longer updating / maintaining this code. It should still work but use at your own risk.

UPDATE Oct 10, 2019: I have switched to using the Shopify Facebook Marketing App to sync my product catalogs with Facebook. Although not perfect, it does the job well enough!

UPDATE Dec 11, 2019: Shopify Facebook Marketing App does not upload all product attributes (Product Type is missing). If you need these missing attributes, I have documented a way to upload the missing data via a custom xml feed.

Below is a free customizable DIY solution to create a Facebook Product Feed in Shopify.

  1. This is an advanced topic and assumes you have the required understanding of HTML/XML/Liquid, the Shopify Store Admin and Facebook Business Manager.
  2. There are several existing paid apps that allow you to do this without coding (Flexify and DataFeedWatch) and a free app (Facebook Marketing App by Shopify).

1. Install the Google Shopping Channel

Install Shopify’s free Google Shopping app. This will allow you to configure product properties such as Age Group, Gender, and Product Category.

2. Create an XML Collection Template

Create a custom collection template that will output your products as XML instead of HTML.

  • In the Shopify admin, go to Online Store > Themes > Action > Edit Code
  • Under Templates, choose Add a new Template
  • Choose collection from the drop down and name your template fb-product-feed

Paste the code below into your new template and click Save. (Best to copy the code from this link: Shopify Facebook Product Feed Template)

{% layout none %}<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
{%- paginate collection.products by 1000 -%}
{%- assign CountryCode = 'US' -%}
{%- if shop.currency == 'CAD' -%}{%- assign CountryCode = 'CA' -%}{%- endif -%}
{%- assign PriceAdjustment = 1.0 -%}
{%- assign PriceAdjustmentEffectiveDate =  '20181226T080000-0500/20190102T235900-0800' -%}

<channel>
<title>{{ shop.name }} {{ collection.title | replace: '&', '&' }}</title>
<link>{{ shop.url }}</link>
<description>{{ collection.description | strip_html }}</description>
{%- for product in collection.products -%} 
  {%- assign GoogleProductCategory = product.metafields.mm-google-shopping.google_product_category -%}
  {%- assign Gender = product.metafields.mm-google-shopping.gender -%}
  {%- assign AgeGroup = product.metafields.mm-google-shopping.age_group -%}
  {%- assign Color = "" -%}
  {%- assign Size = "" -%}

  {%- if product.variants.size > 0 -%}
  {%- for variant in product.variants -%}
    {%- for option in product.options -%}
  	  {%- if option == 'Color' -%}{% capture Color %}{{ variant.options[forloop.index0] }}{% endcapture %}
  	  {%- elsif option == 'Size' -%}{% capture Size %}{{ variant.options[forloop.index0] }}{% endcapture %}
  	  {%- endif -%}
    {%- endfor -%}

    {% comment %} Calculate Sales vs Base Pricing {% endcomment %} 
    {%- if variant.compare_at_price == blank -%}
      {%- assign BasePrice = variant.price -%}
    {%- else -%}
      {%- assign BasePrice = variant.compare_at_price -%}
    {%- endif -%}
    {%- assign SalePrice = variant.price | times: PriceAdjustment -%}

<item>
<title>{{ product.title | strip_html | strip_newlines | replace: '&', '&' }}{% unless product.title contains Color %} {{ Color | replace: '&', '&' }}{% endunless %}</title>
<link>{{ shop.url }}{{ variant.url }}</link>
<description>{{ product.title | strip_html | strip_newlines | replace: '&', '&' }} {{ variant.title | strip_html | strip_newlines | replace: '&', '&' }} {{ product.description | replace: '</', ' </' | strip_html | strip_newlines | replace: '&', '&' }}</description>
<g:google_product_category>{{ GoogleProductCategory | replace: '&', '&'  }}</g:google_product_category>
<g:item_group_id>{{ product.id }}</g:item_group_id>
<g:id>{{ variant.id }}</g:id>
<g:condition>new</g:condition>
<g:price>{{ BasePrice | money_without_currency }} {{ shop.currency }}</g:price>
{%- if SalePrice < BasePrice -%}<g:sale_price>{{ SalePrice  | money_without_currency }} {{ shop.currency }}</g:sale_price>{%-  endif -%}
{%- if PriceAdjustment < 1 -%}<g:sale_price_effective_date>{{ PriceAdjustmentEffectiveDate }}</g:sale_price_effective_date>{%- endif -%}
<g:availability>{% if variant.available %}in stock{% else %}out of stock{% endif %}</g:availability>
<g:image_link>http:{% if variant.image.src %}{{ variant.image.src | product_img_url: 'grande' }}{% else %}{{ product.featured_image.src | product_img_url: 'grande' }}{% endif %}</g:image_link>
<g:gtin>{{ variant.barcode }}</g:gtin>
<g:brand>{{ product.vendor }}</g:brand>
<g:mpn>{{ variant.sku }}</g:mpn>
<g:product_type>{{ product.type | replace: '&', '&' }}</g:product_type>
<g:age_group>{{ AgeGroup }}</g:age_group>
{% unless Color == "" %}<g:color>{{ Color | strip_html | strip_newlines | replace: '&', '&' }}</g:color>{% endunless %}
{% unless Size == "" %}<g:size>{{ Size | strip_html | strip_newlines | replace: '&', '&' }}</g:size><g:size_system>US</g:size_system>{% endunless %}
<g:gender>{{ Gender }}</g:gender>
<g:custom_label_0>{{ product.metafields.mm-google-shopping.custom_label_0 }}</g:custom_label_0>
<g:custom_label_1>{{ product.metafields.mm-google-shopping.custom_label_1 }}</g:custom_label_1>
<g:custom_label_2>{{ product.metafields.mm-google-shopping.custom_label_2 }}</g:custom_label_2>
<g:custom_label_3>{{ product.metafields.mm-google-shopping.custom_label_3 }}</g:custom_label_3>
<g:custom_label_4>{{ product.metafields.mm-google-shopping.custom_label_4 }}</g:custom_label_4>
<g:shipping_weight>{{ variant.weight | weight_with_unit }}</g:shipping_weight>
</item>

  {% endfor %}
  {% else %}

  {% comment %} Calculate Sales vs Base Pricing {% endcomment %} 
  {%- if product.compare_at_price_min == blank -%}
    {%- assign BasePrice = product.price -%}
  {%- else -%}
    {%- assign BasePrice = product.compare_at_price_min -%}
  {%- endif -%}
  {%- assign SalePrice = product.price | times: PriceAdjustment -%}

<item>
<title>{{ product.title | strip_html | strip_newlines | replace: '&', '&' }}</title>
<link>{{ shop.url }}{{ product.url }}</link>
<description>{{ product.title | strip_html | strip_newlines | replace: '&', '&' }} {{ product.description | replace: '</', ' </' | strip_html | strip_newlines | replace: '&', '&' }}</description>
<g:google_product_category>{{ GoogleProductCategory | replace: '&', '&'  }}</g:google_product_category>
<g:item_group_id>{{ product.id }}</g:item_group_id>
<g:id>{{ product.id }}</g:id>
<g:condition>new</g:condition>
<g:price>{{ BasePrice | money_without_currency }} {{ shop.currency }}</g:price>
{%- if SalePrice < BasePrice -%}<g:sale_price>{{ SalePrice  | money_without_currency }} {{ shop.currency }}</g:sale_price>{%-  endif -%}
{%- if PriceAdjustment < 1 -%}<g:sale_price_effective_date>{{ PriceAdjustmentEffectiveDate }}</g:sale_price_effective_date>{%- endif -%}
<g:availability>{% if product.available %}in stock{% else %}out of stock{% endif %}</g:availability>
<g:image_link>http:{{ product.featured_image.src | product_img_url: 'grande' }}</g:image_link>
<g:gtin>{{ product.barcode }}</g:gtin>
<g:brand>{{ product.vendor }}</g:brand>
<g:mpn>{{ product.sku }}</g:mpn>
<g:product_type>{{ product.type }}</g:product_type>
<g:age_group>{{ AgeGroup }}</g:age_group>
<g:gender>{{ Gender }}</g:gender>
<g:custom_label_0>{{ product.metafields.mm-google-shopping.custom_label_0 }}</g:custom_label_0>
<g:custom_label_1>{{ product.metafields.mm-google-shopping.custom_label_1 }}</g:custom_label_1>
<g:custom_label_2>{{ product.metafields.mm-google-shopping.custom_label_2 }}</g:custom_label_2>
<g:custom_label_3>{{ product.metafields.mm-google-shopping.custom_label_3 }}</g:custom_label_3>
<g:custom_label_4>{{ product.metafields.mm-google-shopping.custom_label_4 }}</g:custom_label_4>
<g:shipping_weight>{{ variant.weight | weight_with_unit }}</g:shipping_weight>
</item>
  {% endif %}
{% endfor %}
</channel>
</rss>
{% endpaginate %}

or Download from Github:  Shopify Facebook Product Feed Template

3. Assign products to your Feed

In Step 2 you created your feed template. Now you need to assign products to this feed:

  • In Shopify Admin, go to Products > Collections > Create Collection
  • Enter a Title: “Facebook Product Feed”
  • Add Products to the collection (either manually or using conditions)
  • IMPORTANT! Assign your feed TEMPLATE to this collection.
    In the bottom right column choose collection.fb-product-feed as the Theme Template.
  • Save and Preview the collection. You should see unformatted text on the screen. This is your Facebook feed.
  • Copy the url as you need it in the next step.

4. Upload your Feed to Facebook

  • In Facebook Business Manager go to Assets > Catalogs > Create Catalog.
  • Catalog Type: E-Commerce
  • Click Add ProductsUse Datafeed
  • Enter the feed collection url you copied in step 3 above. Leave the username & password blank. Choose a time for your daily upload to occur (early morning is usually a good time). Choose your currency.
  • Click Start Upload and wait for the feed to be fetched and processed.
  • Fix errors: If there are errors, go back, fix them, re-fetch, and keep doing so until the feed is error free. Sometimes it is necessary to delete and re-create your catalog in Facebook for some changes to appear.
  • If you have more than 1000 product variants, you will need to submit multiple feeds with a ?page=x querystring appended like so: http://mystore.myshopify.com/collections/facebook-product-feed?page=1 (This will send products 1-1000) and http://mystore.myshopify.com/collections/facebook-product-feed?page=2 (This will send products 1001-2000)

5. Prevent the Facebook Feed from Showing on your Store

Depending on how your store is setup, you may need to add some code to prevent your Facebook feed collection from showing up on your store. The exact way to do this may depend on your theme, but generally you will want to have an “unless” statement within the loop that displays your collections:

{% unless collection.title contains "Facebook" %}
... your collection code ...
{% endunless %}

Done!

You are now ready to setup your Dynamic Product Remarketing campaigns!

Related Posts