How to Add Deep Links to Facebook Dynamic Product Ads

Choose the Service You Need

Once upon a time, I needed to create Facebook dynamic product ads for an eCommerce website. Ok, no problem. But there WAS a problem with such ads: deep linking to product pages!

I assume you faced the same issue as you’ve found this post. If not, you have a great opportunity to know the solution even before this problem occurs to you. So read on and I’ll tell you more about a good way of creating dynamic product ads for eCommerce websites.

What is Facebook Dynamic Remarketing

First things first. Before going further, I just want to make sure you understand what dynamic remarketing ads are.

Dynamic remarketing lets you personalize the ads you show to your audience based on products or content they’ve recently seen on your website.

I bet you also saw such ads: after researching some product and/or adding it to your shopping cart, you visited other websites and – oh my god – saw ads with this particular item. That’s how dynamic remarketing works and Facebook dynamic ads are great for that.

Dynamic remarketing is a powerful tool which can help you engage potential customers and turn prospects into sales. People who have already expressed some interest in your products are 70% more likely to convert.

Before Creating Dynamic Ads…

You should:

  • Have a Facebook pixel installed on your website
  • Track all necessary users’ actions (views, adds to cart, purchases)
  • Create a Facebook product catalog (here is a FB guide on that)

Ready? Let’s get down to the main reason for writing this post.

The Problem with Deep Linking to Products URLs

Ok, you uploaded a product feed with all the needed attributes, like Product Name, Product Description, Price, etc. And as you want to direct clients to appropriate pages (if not, I would be upset), you’ve also added a ‘Link’ attribute to use it for deep linking.

This attribute is recognized by Facebook and can be seen on the product information grid:


At least, that’s what I did. But I have never been so disappointed…

The problem is that Facebook has a restricted list of parameters (at least at time of writing this) that can be used in dynamic ads, and ‘Link’ (or ‘Website Link’ or anything like that) is not one of them:


So you end up trying to choose those parameters that would mimic your URLs. But in most cases that’s not possible!

Usually, a product URL on an eCommerce website looks like this:

Or just

So there is no way to use any of the attributes FB suggests for deep linking. Or you will just land potential customers on a 404 page. Trust me, you don’t want to do that.

What Facebook Says About It

Nothing that could really help you.

I asked a question about deep linking here, and a general answer was to adapt the website URLs to match the template tags:


There is also a relatively new article in the Facebook Help section about setting up deep links in dynamic ads, and most of all I love this part:


This example is great if you want to send users to search pages that are created dynamically and can be based on the available attributes. But that’s not the case if your URLs are static and you don’t want to change them to match FB attributes (why should you do that after all?!).

The Solution to FB Deep Linking Mystery

It’s simple when you think about it: if you don’t want to adapt your website URLs to the template tags, adapt tags to match your URLs!

FB gives you custom labels, so place you URLs there and use them for deep linking.

So this is a good way to add deep links to your product pages:

  1. Add part of a URL after the domain name (e.g. my-super-duper-product.html) in the <custom_label_4> attribute, so it would look like this:


You are free to choose any available custom label from 0 to 4. And please don’t ask me why I chose label 4, I won’t be able to answer.

  1. Upload an updated feed to Facebook and made sure my changes were seen in the product catalog.
  2. Used the new attribute to create deep links for my product URLs:


Viola! It worked. A customer will land on the right page.

Your Turn

Now you can try this method and easily create deep linking for Facebook dynamic product ads. But it’s not enough just to create such ads, it’s also important to optimize them (check out the link, I love this resource, super helpful for Facebook advertisers).

And don’t forget to let me know what you think in the comments below!


12 thoughts on “How to Add Deep Links to Facebook Dynamic Product Ads

  1. Thank you for this article! I did get to the same conclusion, however I have not found a way to create a custom label directly on shopify… I could only create a custom label on a feed.
    Do you know of any workarounds?

    1. Hey Marcia! I used Magento, and I created a custom label directly in the feed.
      I’m not sure you can create it in Shopify without any customization 🙁

  2. how would I create the custom label withon my feed? I can´t change the feed itself but I can create a rule for uploading the feed and changing some data…it think that´s applicable to your example.

    But I have no idea how to make this rule!?


    1. Hey René,
      I’m not sure I can answer this as I added the custom label without using any rules. Good luck anyway!

  3. Thank you for the informative article
    Would go in more detail about how exactly you place a part of an URL in a say custom “Product.Custom_label_0Aa” ?

  4. Have things changed? I think FB let’s us put dynamic URLs as deep links now. At first, when I just insert the ‘URL’ tag as deep link, it says “bla bla it has to start with https://” even though it clearly does (insert the tag into the ‘description’ field and you see it. Then it tells me to use curly brackets, {{product.url}}. After I put that in and Publish, it accepts it and turns it back into the original tag. Funny…

    1. I was thinking the same thing! Tom, so if you just ignore the warning and publish anyway, does it work? What is your workaround?

    2. Bless you!!! That worked! I was having so many problems with this! But you are right…I added {{product.url}} in the DEEP LINK TO WEBSITE (instead of using the dynamic tag they suggest for URL). Then it works! It later looks like the FB URL tag as you said – but now it goes to the right product page. I did not realize my dynamic ads were going to 404 error pages. Thank you!!

  5. Wait… if you leave it blank and you have a product catalog uploaded (with links attributed to each product) it deep links to the product pages automatically… I just double checked on all my campaigns and they work fine.

    For a couple of minutes I thought I had been overlooking the deep link field, but it is just really unobvious that if you leave it blank FB does the deep link for you. The field is if you want to send them somewhere else other than the deep link assigned in the catalog.

Leave a Reply

Your email address will not be published. Required fields are marked *