Categories
Digital Marketing Facebook Ads

Simple Facebook Campaign Structure for DTC Brands

Evergreen Campaigns

An Evergreen Campaign Structure is one that does not change much year over year: Ideally the Campaigns and Ad Sets are continually in use, and only the ad creative is changed.

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

It usually takes a few iterations before you land on your ideal evergreen structure, but here are some recommendations to get you started on the right foot.

Campaign Structure Overview

The campaign structure will look like this

Dynamic Product AdsDynamic Product Ads, targeting people who have previously purchased and interacted with your site
Past PurchasersPeople who have previously purchased from you.
RemarketingPeople who have interacted with your brand but have yet not purchased from you.
ProspectingPeople who have never purchased from you, and who have not interacted with your brand.

Audiences

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

Building the Campaigns

Common Settings

All the campaigns you create will have the following settings

Buying TypeAuction
ObjectiveSales
CatalogYes for Dynamic
No for Regular
Advanced Campaign BudgetYes
Campaign Bid StrategyBid Cap

Conversion Events & Attribution

Initially select “Purchase” as your converion event, with a 1-day or 7 day click only converison window.

If, however, you are unable to obtain at least 50 purchase events per week for an ad set, you will want to instead choose “Add to cart” as your conversion event, with a 1-day click only conversion window.

Campaign #1:
Dynamic Product Ads

This campaign will contain all your Dynamic Product ads and ad sets. This is the most automated campaign type, with generally very little management required.

You will need to have your Product Catalog and Product Feeds setup before you can create this campaign.

Campaign NameDynamic Product Ads
Buying TypeAuction
ObjectiveSales
CatalogYes
Advanced Campaign BudgetYes
Campaign Bid StrategyBid Cap

Ad Sets

1. Dynamic Remarketing < 30d
Ad Set NameDynamic Remarketing < 30d
Performance GoalMaximize number of conversions
Conversion EventPurchase
Bid ControlTBD
Attribution Setting1-day click
Product SetAll in-stock products
AudienceCreate new Audience
Retarget Ads:
Viewed or Added to Cart
but not Purchased: 30d
Audience ExclusionsNone
2. Dynamic Remarketing 30d-180d
Ad Set NameDynamic Remarketing 30d-180d
Performance GoalMaximize number of conversions
Conversion EventPurchase
Bid ControlTBD
Attribution Setting7-day click
Product SetAll in-stock products
AudienceCreate new Audience
Retarget Ads:
Viewed or Added to Cart
but not Purchased: 180d
Audience Exclusions– Purchase All Time
– AddToCart 30d
– Website Visitors 30d
3. Dynamic Past Purchasers > 30d
Ad Set NameDynamic Past Purchasers > 30d
Performance GoalMaximize number of conversions
Conversion EventPurchase
Bid ControlTBD
Attribution Setting7-day click
Product SetAll in-stock products
AudienceCreate new Audience
Find Prospective Customers
– Purchase 180d
– Purchase All Time
Audience Exclusions– Purchase 30d
– AddToCart 30d
– Website Visitors 30d
4. Dynamic Prospecting
Ad Set NameDynamic Prospecting
Performance GoalMaximize number of conversions
Conversion EventPurchase
Bid ControlTBD
Attribution Setting7-day click
Product SetAll in-stock products
AudienceCreate new Audience
Find Prospective Customers
(no explicit targeting)
Audience Exclusions– Purchase All Time
– Purchase 180d
– AddToCart 180d
– Website Visitors 30d
– Website Visitors Top 25% 180d

For high-volume sites, or for periods of high sales such as Black Friday, you can also consider creating additional more granular ad sets, with shorter time windows, or explicitly targeting cart abandoners.

For lower-volume sites, you may need to change your conversion event to “AddToCart” instead of “Purchase” if you have less than 50 purchases per week.

Campaign #2:
Past Purchasers

This campaign targets people who have previously purchased from you.

Campaign NamePast Purchasers
Buying TypeAuction
ObjectiveSales
CatalogNo
Advanced Campaign BudgetYes
Campaign Bid StrategyBid Cap

Ad Sets

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

1. Past Purchasers All Time
Ad Set NamePast Purchasers All Time
Performance GoalMaximize number of conversions
Conversion EventPurchase
Bid ControlTBD
Attribution Setting7-day click
Audience– Purchase All Time
– Purchase 180d
Audience Exclusions– AddToCart 30d
– Purchase 30d
– Website Visitors Top 25% 30d

For high volume businesses that have large amount of customers, multiple Ad Sets could be created to have more granular control based on past purchase date.

Campaign #3:
Remarketing

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

Campaign NameRemarketing
Buying TypeAuction
ObjectiveSales
CatalogNo
Advanced Campaign BudgetYes
Campaign Bid StrategyBid Cap

Ad Sets

Ad it’s most basic, the Remarketing Campaign contains only two Ad Sets: One targeting site visitors up to 30 days ago, and another targeting site visitors up to 180 days ago (the Facebook maximum)

1. Remarketing < 30d
Ad Set NameRemarketing < 30d
Performance GoalMaximize number of conversions
Conversion EventPurchase
Bid ControlTBD
Attribution Setting1-day click
Audience– Visitors 30d
– FB Engagement 30d
– IG Engagement 30d
Audience Exclusions– Purchase All Time
– Purchase 180d
2. Remarketing 30d-180d
Ad Set NameRemarketing 30d-180d
Performance GoalMaximize number of conversions
Conversion EventPurchase
Bid ControlTBD
Attribution Setting7-day click
Audience– Site Visitors 180d
– FB Engagement 180d
– IG Engagement 180d
Audience Exclusions– Purchase All Time
– Purchase 180d
– Visitors 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… Or separating ad sets into stronger/weaker pruchase intent such as Add to Carts, Product Views, Social Engagement, etc…

Campaign #4:
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, but the more you can manage to spend here, the more you will be able to spend on Remarketing.

Campaign NameRemarketing
Buying TypeAuction
ObjectiveSales
CatalogNo
Advanced Campaign BudgetYes
Campaign Bid StrategyBid Cap

Ad Sets

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 lower funnel Remarketing audiences so that there is no overlap with your campaigns.

1. Prospecting 1% Look-a-Like
Ad Set NameProspecting 1% Look-a-Like
Performance GoalMaximize number of conversions
Conversion EventPurchase
Bid ControlTBD
Attribution Setting7-day click
Audience– 1% Look-a-like Purchase
Audience Exclusions– Purchase All Time
– Purchase 180d
– Visitors 30d
– Visitors Top 25% 180d

More to Explore

In a follow-up post I will give some guidelines into how to:

  • Calculate your Bid Caps
  • When (and how) to change your Conversion Event from Purchase to Add to Cart.
  • Building your first ads and replicating your organic posts into this campaign structure.

Related Reading

Categories
Digital Marketing Facebook Ads

Essential Facebook Audiences

Below is a list of the Essential Facebook Audiences that every e-commerce DTC brand should create. 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 Purchaser Audiences

These target users that have previously purchased from you. Larger e-commerce sites may wish to get more granular on the time-spans, but the 4 audiences cover most scenarios.

Audience NameSourcePixel Criteria
Purchase: 7 dayWebsitePurchase: 7 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 at least every 180 days.

Remarketing Audiences

These will target 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 the lowest hanging fruit for generating sales.

Larger e-commerce sites may want to get more granular on the time-scales.

Audience NameSourcePixel Criteria
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%: 7 dayWebsiteVisitors by Time spent:
Top 25%: 7 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: 7 dayFacebookEveryone who engaged
with your page: 7d
FB Engagement: 30 dayFacebookEveryone who engaged
with your page: 30d
FB Engagement: 180 dayFacebookEveryone who engaged
with your page: 180d
IG Engagement: 7 dayInstagramEveryone who engaged
with your business: 7d
IG Engagement: 30 dayInstagramEveryone who engaged
with your business: 30d
IG Engagement: 180 dayInstagramEveryone who engaged
with your business: 180d

Prospecting Audiences

Lookalike audiences are a good start for new customer prospecting.

Lookalike SourceEventNumber of
Audiences
Audience Markers
Facebook Pixel
or
Purchase: All Time
Purchase40%, 1%, 2%, 5%, 10%
Choose 4 audiences, and set markers at 0%, 1%, 2%, 5%, and 10%

Related Posts

Categories
Digital Marketing Google Ads Shopify

Google Ads Dynamic Remarketing for Shopify

Last Updated: September 25, 2020

STEP 1
Activate Dynamic Remarketing in Google

  1. Go to Google Ads > Tools & Settings > Shared Library > Audience Manager > Audience Sources
  2. Click Set up tag in the “Google Ads tag” card
  3. Remarketing: Choose “Collect data on specific actions…
  4. Business Type: Choose “Retail
  5. Retail Parameters: Select All Parameters
  6. Click Save and continue.
  7. Click on Install Tag Yourself
  8. In the first code box, look for the number at the end of the first line of code and write it down or copy it. This is your Google Conversion Id — you will need it in the next step.
<!-- Global site tag (gtag.js) - Google Ads: 123456789 -->
  1. Click Continue and then Done

STEP 2
Install the Remarketing Code in Theme.liquid

In your store’s admin section go to:

  • Online Store > Themes > Actions > Edit Code
  • Expand the Snippets section and choose Add new snippet
  • Call the snippet “adwords-remarketing
  • Paste the code below into the snippet
  • Enter your google_conversion_id that you obtained in Step 1.8 above.
{% comment %}
Google Ads Dynamic Remarketing Script by Alex Czartoryski
https://business.czarto.com/2017/02/07/shopify-dynamic-remarketing-setup/

This version: Sept 30, 2020
The latest version of this script available here:
https://github.com/Czarto/ShopifyScripts/blob/master/snippets/adwords-remarketing.liquid
{% endcomment %}

{% comment %}Set to false if GTAG is already loaded on the page. Leave to true if unsure.{%endcomment%}
{% assign load_gtag = true %}

{% comment %} Enter your google conversion id below {% endcomment %}
{% assign google_conversion_id = 123456789 %}

{% assign shopify_store_country  = 'US' %}
{% if shop.currency == 'CAD' %}
{% assign shopify_store_country  = 'CA' %}
{% elsif shop.currency == 'AUD' %}
{% assign shopify_store_country  = 'AU' %}
{% endif %}

{%if load_gtag %}
<!-- Global site tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-{{ google_conversion_id }}"></script>
{% endif %}
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-{{ google_conversion_id }}');
</script>

{% assign google_event = false %}
{% assign google_items = false %}
{% assign google_value = false %}
{% if template contains 'cart' %}
	{% assign google_event = 'add_to_cart' %}
	{% capture google_items %}{% for item in cart.items %}{'id':'shopify_{{ shopify_store_country  }}_{{ item.product.id }}_{{ item.variant.id }}','google_business_vertical': 'retail'}{% unless forloop.last %}, {% endunless %}{% endfor %}{% endcapture %}
	{% assign google_value = cart.total_price %}
{% elsif template contains 'collection' %}
	{% assign google_event = 'view_item_list' %}
	{% capture google_items %}{% for item in collection.products limit:5 %}{'id':'shopify_{{ shopify_store_country  }}_{{ item.id }}_{{ item.variants.first.id }}','google_business_vertical': 'retail'}{% unless forloop.last %}, {% endunless %}{% endfor %}{% endcapture %}
{% elsif template contains 'product' %}
	{% assign google_event = 'view_item' %}
	{% capture google_items %}{'id':'shopify_{{ shopify_store_country  }}_{{ product.id }}_{{ product.selected_or_first_available_variant.id }}','google_business_vertical': 'retail'}{% endcapture %}
	{% assign google_value = product.selected_or_first_available_variant.price %}
{% elsif template contains 'search' %}
	{% assign google_event = 'view_search_results' %}
	{% capture google_items %}{% for item in search.results limit:5 %}{'id':'shopify_{{ shopify_store_country  }}_{{ item.id }}_{{ item.variants.first.id }}','google_business_vertical': 'retail'}{% unless forloop.last %}, {% endunless %}{% endfor %}{% endcapture %}
{% endif %}

{% if google_event %}
<script>
	gtag('event', '{{ google_event }}', {
	  'send_to': 'AW-{{ google_conversion_id }}',
	  {% if google_value %}'value': '{{ google_value | divided_by: 100.0 }}',{% endif %}
	  'items': [{{ google_items }}]
	});
</script>
{% endif %}

The latest version of this code is available on Github

Add snippet to your Theme file

Open up Layout > theme.liquid and add the following line of code before the closing </head> tag:

{% include 'adwords-remarketing' %}

STEP 3
Install Remarketing in the Checkout Scripts

  • In the very bottom left hand corner the Shopify Admin choose Settings and then Checkout
  • Scroll down to the Additional Scripts section.
  • Copy and paste the code below into the “Additional Scripts” field and update google_conversion_id with your value from step 1.8 as before.
{% comment %}
Google Ads Dynamic Remarkting Script by Alex Czartoryski https://business.czarto.com/

This version: Sep 30, 2020
The latest version of this script available here:
https://github.com/Czarto/ShopifyScripts/blob/master/settings/checkout/adwords-remarketing.liquid
{% endcomment %}

{% comment %}Set to false if GTAG is already loaded on the page. Leave to true if unsure.{%endcomment%}
{% assign load_gtag = true %}

{% if first_time_accessed %}
{% comment %} Enter your account specific values below {% endcomment %}
{% assign google_conversion_id = "123456789" %}

{% assign shopify_store_country  = 'US' %}
{% if shop.currency == 'CAD' %}
{% assign shopify_store_country  = 'CA' %}
{% elsif shop.currency == 'AUD' %}
{% assign shopify_store_country  = 'AU' %}
{% endif %}


{%if load_gtag %}
<!-- Global site tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-{{ google_conversion_id }}"></script>
{% endif %}
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-{{ google_conversion_id }}');
</script>

<!-- Event snippet for Web Order conversion page -->
<script>
    // Google Ads Remarketing
    gtag('event', 'purchase', {
	  'send_to': 'AW-{{ google_conversion_id }}',
	  'value': '{{ total_price | divided_by: 100.0 }}',
	  'items': [{% for item in order.line_items %}{'id':'shopify_{{ shopify_store_country }}_{{ item.product.id }}_{{ item.variant.id }}','google_business_vertical': 'retail'}{% unless forloop.last %}, {% endunless %}{% endfor %}]
	});
</script>

{% endif %}

Download the lastest version from Github

STEP 4
Verification

Once you’ve installed all your code, it’s time to run through your main pages (collection, product, cart, and purchase pages) with Google Tag Assistant installed to make sure there are no errors.

Next Steps
Configure your Remarketing Audiences

Now that your store is collecting dynamic remarketing data, the next step is to properly organize and segment your visitors into Purchasers, Cart Abandoners and Product Viewers. This is covered in the next post about Google Ads Remarketing Audiences.

Additional Reading…

Categories
Digital Marketing Google Ads

Google Ads Remarketing Campaign Structure

Remarketing Theory

  1. The deeper a user is in your sales funnel, the more likely he is to buy. A shopping cart abandoner is more likely to buy than a product browser who is more likely to buy than someone who briefly visited your homepage.
  2. The more recent the user’s visit, the more likely he is to buy. A user who visited your site yesterday is more likely to buy than a user who visited your site 10 days ago.
  3. The more likely a user is to buy, the more you want to bid on that user.

Audiences

Please read the post Essential Google Ads Remarketing Audiences and follow the instructions to create your remarketing audiences.

Campaign Setup

Create one campaign per major market you are targeting, and give them a descriptive name:

  • USA: Display Remarketing
  • Canada: Display Remarketing

Generally, but not always, you will want a separate campaign for every unique currency and language you are targeting.

Core Ad Groups

1. Cart Abandoners

This ad group will target cart abandoners: Visitors who added a product to their cart but never purchased. Dynamic Product ads perform particularly well with cart abandonment, as your visitors are shown the exact products that they added to their cart.

Audiences:

  • Cart Abandoners – 7 day
  • Cart Abandoners – 14 day
  • Cart Abandoners – 30 day
  • Cart Abandoners – 90 day
  • Cart Abandoners – 180 day

2. Product Viewers

This ad group will target users who visited a product details page but who never added a product to their cart.

Audiences:

  • Product Viewers – 14 day
  • Product Viewers – 30 day
  • Product Viewers – 90 day
  • Product Viewers – 180 day
  • Product Viewers – 365 day
  • Product Viewers – 520 day

3. Past Buyers

This ad group will show ads to people who have previously purchased. This is a good place to push micro conversions such as joining a loyalty program, joining a community, new product launches or related product up-selling.

Audiences

  • Past Buyers 14 days
  • Past Buyers 30 days
  • Past Buyers 90 days
  • Past Buyers 365 days
  • Past Buyers 520 days

Other Tips

Exclude Mobile App Placements

Exclude placements where users are unlikely to interact with your ad, or where they may accidentally click your ad, such as in mobile apps and games.

To exclude mobile apps, go to your ad group and then select:

  • Placements > Exclusions tab > Exclude placements
  • App Categories > Expand All App Categories, and exclude all app categories individually
  • Repeat for all your display ad groups

Exclude YouTube Placements

YouTube tracks View Through Conversions as if they were Click Through Conversions. This leads to attribution poaching, and makes your display campaigns appear to perform much better than they actually do. This ultimately causes you to increase bids and budgets, and overspend.

To exclude YouTube placements, go to: Campaign Settings > Additional Settings > Content Exclusions and select all of the following for exclusion:

  • Live streaming YouTube video
  • Embedded video
  • In-video

Exclude GMail Placements

Gmail “clicks” don’t necessarily result in a visit to your site, and usually only represent the expansion of your ad. This can lead to attribution poaching, in particular if you have a newsletter that you send our regularly.

To exclude gmail placements, go to Placements > Exclusions and exclude mail.google.com

A word about View Through Conversions

View Through Conversions are conversions where a display ad appeared on the screen, was NOT clicked, but the user ended up purchasing on your site sometime later. In general I recommend that everyone IGNORE View Through Conversions, in particular in remarketing campaigns.

What usually happens, is that an ad is displayed on screen, the visitor may not even see it, but clicks instead on a cart-abandonment e-mail and makes the purchase. AdWords will credit that conversion to the view through.

The one exception is for “brand unaware” customers. These are customers that have never visited your website before. If such a customer sees you ad, and purchases, then the odds are better that it was a result of your ad.

In an ideal world, there would be a simple way to test the value of your view-through-conversions, as they are different for every segment, and every business.

Other Resources

Categories
Digital Marketing Google Ads Shopify Shopping

Add Microdata to your Shopify Product Pages (with variant support)

If you are using Google Merchant Center to with Shopify then you have likely ran into an issue where Merchant Center will give you a warning that there is insufficient match of micro-data information and that automatic item updates are no longer being performed.

merchant-center-warning
Insufficient micro-data warnings in Google Merchant Center

This is generally due to incorrect or incomplete micro-data on your product page.

Product.liquid

All the required edits should be limited to your Product.liquid file. You need to define a Product itemscope which will have properties such as Product Url, Product Image, Product Title, and Product Description.

Nested within the Product will be an Offer itemscope that will contain the product variant’s price, currency, condition, and availability.

What complicates things is that most Shopify Themes will have at least a partial implementation of micro-data, and are perhaps only missing a few items, or perhaps don’t fully support variants.

A good idea would be to first run your product page through Google’s Structured Data Testing Tool to see which tags already exist.

Product ItemScope

1. Open your product.liquid file and add the Product itemscope property to the outer most div. The first line of your product.liquid should look something like this: 

<div itemscope itemtype="http://schema.org/Product">

2. Directly below this line, you should add the product variant’s url and image markup as so:

<meta itemprop="url" content="{{ shop.url }}{{ product.selected_or_first_available_variant.url }}" />
<meta itemprop="image" content="https:{{ product.selected_or_first_available_variant.image.src | product_img_url: 'grande' }}" />

3. Find where your product’s title and description are displayed, and add itemprop=name and itemprop=description attributes as shown below:

<!-- Product Title -->
<h1 itemprop="name">{{ product.title }}</h1>
<!-- Product description -->
<div class="product-description" itemprop="description">
{{ product.description }}
</div>

Offer ItemScope

4. Now you need to find the place in your product.liquid file where you display your price. Find a wrapping div tag and add the Offers itemscope attributes to the tag. The Offers itemscope MUST nested within the Product itemscope div tag.

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">

5. Immediately after this line you can add the product variant’s price, currency, condition, and availability microdata as so:

<meta itemprop="priceCurrency" content="{{ shop.currency }}" />
<meta itemprop="price" content="{{ product.selected_or_first_available_variant.price | money_without_currency | remove: ',' }}" />
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition"/>
{% if product.selected_or_first_available_variant.available %}
  <link itemprop="availability" href="http://schema.org/InStock" />
{% else %}
  <link itemprop="availability" href="http://schema.org/OutOfStock" />
{% endif %}

Putting it all together

Once done, your product.liquid should have roughly the following structure.

<!-- BEGIN Product itemscope -->
<div itemscope itemtype="http://schema.org/Product">
  <meta itemprop="url" content="{{ shop.url }}{{ product.selected_or_first_available_variant.url }}" />
  <meta itemprop="image" content="https:{{ product.selected_or_first_available_variant.image.src | product_img_url: 'grande' }}" />
 
  <!-- Product Title & Description -->
  <h1 itemprop="name">{{ product.title }}</h1>
  <div class="product-description" itemprop="description">
  {{ product.description }}</div>
  <!-- BEGIN Offer itemscope -->
  <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    <meta itemprop="priceCurrency" content="{{ shop.currency }}" />
    <meta itemprop="price" content="{{ product.selected_or_first_available_variant.price | money_without_currency | remove: ',' }}" />
    <meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition"/>
    {% if product.selected_or_first_available_variant.available %}
      <link itemprop="availability" href="http://schema.org/InStock" />
    {% else %}
      <link itemprop="availability" href="http://schema.org/OutOfStock" />
    {% endif %}
  </div>
</div>

Final Steps

  1. Save and test your new product page in Google’s Structured Data Testing Tool, and fix all errors if any.
  2. Wait and check back periodically in Google Merchant center to ensure no new errors were introduced. It will take a few weeks before the “unable to update” warning disappears.

Related Reading

Categories
Facebook Ads Shopify

DIY Facebook Product Feed for Shopify

WARNING! This code is no longer maintained. Although the code in this post should still work, please use at your own risk. I recommend using the Shopify Facebook Marketing App to sync your product catalog.

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

Categories
Attribution Digital Marketing Facebook Ads Google Ads

The Value of View Through Conversions

My personal experience with View Through Conversions (VTCs) is that they provide very little real-world lift in sales, and are more likely just poaching attribution from other channels. So I almost always give VTCs a value of zero and ignore them.

The truth probably lies somewhere in-between. For lower funnel remarketing campaigns VTCs probably provide close to zero value, while for truly brand-unaware audiences, the value is somewhere between 0 and 100%.

If you are one of those who wants to believe in the value of VTCs, you should calculate the true value of VTCs by running a placebo A/B test. Below is just such a test that we ran on the AdRoll network back in 2013:

Placebo A/B Tests to Measure View Through Conversions

Display Network A/B Test

How to Setup a Placebo A/B Test

You will likely need assistance from your ad platform or ad agency to properly run this sort of test. It is usually difficult to have a blank or psa ad approved.

  1. Create 2 separate (but equal) non-overlapping campaigns
  2. Campaign A will serve your “normal” ad
    Campaign B will serve a Public Service Announcement ad
  3. Run both campaigns for a few weeks
  4. Calculate VTC “lift” as follows:
Valid VTC Formula

Real Life Example

Campaign A
(Real Ad)
Campaign B
(PSA Ad)
Impressions99,46797,412
VTCs329261
Data from a real world A/B test performed in 2013 on the AdRoll network

VTC “Lift” = (329 – 261) / 329 = 20%

In this real life example, the irrelevant PSA Ads still managed to generate 80% of the View Through Conversion volume that the real ad generated. To be more clear, 261 people saw an ad to adopt a cat, and later went to BOATERexam.com to purchase a boating license.

So 80% of VTCs can be given a value of zero. Of the remaining 20%, more analysis is needed to figure out exactly how they influenced sales. The Real Ad did seem to generate more VTCs than the PSA ad, but the real question is if those VTCs resulted in extra incremental sales or were they simply tracking sales generated by another channel such as e-mail?

Real Life Example #2: Facebook

A few years later we ran a similar Placebo A/B test on Facebook with the help of SocialCode. Unfortunately I no longer have the data for this test, but the end results was that there was ZERO lift from VTCs, and the PSA ad actually outperformed the real ads from a VTC standpoint! (People seeing cats were buying more boating licenses than the people seeing ads for a boating license)

So how should you value View Through Conversions?

Here are my recommendations:

  • Give View Through Conversions a value of ZERO. Unless you can prove otherwise via an A/B test. This is especially true for re-marketing campaigns where the visitors have previously visited your site, and may be actively engaged in checkout when the ad is shown.
  • Run your own Placebo A/B test. If someone insists on using VTCs in performance metrics, then you should insist on running an A/B test to calculate the true value. You should run at least two tests: One for remarketing audiences and another for brand-unaware audiences.
  • Be cautious and skeptical of anyone pushing the value of VTCs especially if they are an ad agency or ad platform that will benefit from including the extra VTCs in their performance metrics.

When can View Through Conversions be valuable?

  • Brand Unaware Audiences on Trusted Networks: If you are marketing to a 100% brand-unaware audience, and a trustworthy network, then there might be a valid argument to give VTCs some credit.
  • To measure which sites your customers frequently visit: Looking at VTCs on a per-placement level, *should* theoretically be a good indication of which sites your customers spend time on. You can then consider having targeted prospecting campaigns focused explicitly on those sites.