Skip to content

Creating Branch Links For Product Feeds


A product feed or catalog is essentially an inventory of all your products and contain information like images, prices, descriptions and more. These attributes are used to define each one of your products in a unique way. Your product feed or catalog should reflect your business type, consisting of different attributes that are specific to your products.

Your Branch link ensures your users are taken to the correct product feed or catalog content and when used as part of your dynamic and responsive marketing efforts, they allow you to effectively engage with users who have expressed interest in a wide range of your products across both web and app.

Prerequisites for Product Feeds

  • Deep Link Routing set up in your Branch dashboard
  • Universal Links and/or App Links enabled in your iOS or Android app
  • Facebook and/or Google Ads integrations enabled in your Branch Dashboard
  • Branch link per product feed item

Prerequisites for the Branch Product Feed Script

  • Feeds formatted as a CSV file
  • Github
  • Python 3.5+

As each product in your product feed is unique, each requires its own Branch link to ensure the user is not only taken to the correct content, but for Branch to correctly attribute the event.

The best way to create Branch deep links for your product feed is to create a "long link" for each product feed item.

To create a Branch link:

  1. Start with your base domain.
    1. e.g.
  2. Add your deep link data as query parameters. NOTE: Be sure to URI encode each query parameter.
    1. e.g.
  3. Add any fallback URLs to ensure proper routing if the app isn't installed.
    1. e.g.$
  4. Finally, add the following analytics parameters needed to categorize your data accurately.
    1. Generic Branch Analytics Parameters
    2. Facebook Analytics Parameters
    3. Google Ads Analytics Parameters

Your final link for Facebook looks like this:$

Your final link for Google Ads looks like this:$

Creating a Product Feed

When you create a feed, you're creating a database of products or services that can be used in your responsive/dynamic ads. Depending on your inventory type, data feeds need to have different information columns.

Facebook Data Feeds

There are several different methods to add items to your catalog. One method is to use a data feed, which allows you to add many items to your catalog at once. A data feed is a spreadsheet file where you enter information about your inventory.

Please refer to Facebook’s Ads documentation for the following:

Google Feeds

The type of feed you create should match the business type you selected when creating your Dynamic remarketing campaign. Use the "Custom" feed only if the other business types don't apply to your products or services.

Please refer to Google’s Create a feed for your responsive ads for the following:

  • About feeds
  • Get feed templates and specs for your business type
  • Create and upload a new feed
  • Fix problems with your feed

Once you’ve created a Branch link for each item in your product feed, you need to include these links in your product feed file before uploading it to Facebook or Google Ads.

When creating your product feed, one of the required parameters is the link parameter. The link parameter is typically a URL link to merchant's site (website landing page) where you can purchase or learn more about the item.

When using Branch links - that already contain all of the proper routing given multiple scenarios - you must substitute your website landing page URL with your Branch link.

Uploading Your Feed

To Facebook

We recommend using Facebook’s Product Feed Debug Tool to test and debug your Product Feed format. The largest file size accepted by the tool is 50MB.

To upload your product feed to Facebook, please follow Facebook’s help document on Add Catalog Items with a Data Feed.

To Google Ads

There are limits to the number of feeds and feed items per account. Learn more About Google Ads account limits.

To upload your product feed to Google Ads, please follow Google’s help document on Create a feed for your responsive ads.

If you're a retail business, use the Google Merchant Center to upload your product feed.

To expedite the link creation process, we recommend using a script to programmatically bulk build your Branch links and insert them into your pre-existing feed CSV file.

The Branch Product Feed Link script parses your pre-existing product feed CSV file and (1) creates correctly formatted Branch links for each item in your feed, and (2) updates the link column with the newly created Branch link.

The script includes the templates necessary to append your Branch links with the necessary information required for proper routing and attribution for Facebook and Google campaigns.

NOTE: The website URLs in the link column of your CSV will be appended to the Branch link as the URL to fallback to using the fallback_url parameter if (1) the user does not have the app installed, or (2) Branch cannot deep link the user into the app.

Script Template for Facebook

The following parameters and corresponding values will be appended to your Branch link base domain - - for Facebook Ad campaigns.

Parameter Value
$3p a_facebook
~advertising_partner_name Facebook
$one_time_use false
~branch_ad_format Cross-Platform Display OR App Only
~channel Facebook
~feature paid advertising
~campaign {{}}
~ad_id {{}}
~ad_set_id {{}}
~campaign_id {{}}

Script Template for Google Ads

The following parameters and corresponding values will be appended to your Branch link base domain - - for Google Ads campaigns.

Parameter Value
$3p a_google_adwords
~advertising_partner_name Google Adwords
$one_time_use false
~branch_ad_format Cross-Platform Search
~channel Google Adwords
~feature paid advertising
~ad_set_id {adgroupid}
~campaign_id {campaignid}
~keyword {keyword}
~placement {placement}
gclid {gclid}
lpurl {lpurl}
$always_deeplink false
$android_deepview false
$ios_deepview false
$desktop_deepview false
$android_passive_deepview false
$ios_passive_deepview false

Running the Branch Product Feed Script

In order to run the product feed script, you will need (1) Your product feed CSV, (2) Github account, (3) Python 3.5+.

  1. Clone or download the Branch Product Feed v1 Github repo.
  2. Upload your pre-existing product feed CSV to the Input folder.
  3. Open the settings.json file and edit the following parameter’s values:
    1. "input_file": "File name of your uploaded CSV",
    2. "base_url": "Your default link domain, e.g.",
    3. "active_template": “Name of the template to apply from the template folder”
  4. Execute script python | ./ etc.
  5. Retrieve updated product feed CSV from the Output folder.