A Meta custom conversion with a URL rule counts page views from your pixel. If the download button links straight to a file, such as an installer, no page with your pixel ever loads, so the conversion never records. An ad set optimizing for it gets zero events and nothing to learn from.
On a mentoring call, a founder selling downloadable desktop software had spent about $100 across Meta and Google. The Meta ad set was optimizing for link clicks. The action that mattered was a click on Download free now. During the call we installed the Meta pixel in the site-wide header, checked it in Test Events, and created a custom conversion with a URL contains rule using the link behind the download button. That last step deserves a second look.
How URL-based custom conversions fire
To log an action without extra code, you create a custom conversion on All URL traffic and add URL rules. Meta says All URL traffic is determined using Page view events, which come with the pixel base code, and it logs visits to any URL with that event installed. Meta's setup advice is direct: the URL web page needs the pixel base code with the page view event on it.
That rules out a URL that is a file. When someone clicks a link to an installer, the browser downloads it. No HTML page loads, no pixel runs, and no Page view event is sent. On the call, the founder said the button could also open a separate download page. If that page is on your site and carries the pixel, the custom conversion can fire. If the button points at the file itself, it can't.
Three ways to track a download Meta can optimize for
- Route the click through a page. Send the button to a download or thank-you page on your own domain with the pixel, and let that page start the download. Build the custom conversion on that page's URL. Meta suggests URL contains with the minimum part of the URL that identifies the page, because URL equals misses any visit with UTM parameters or a trailing slash.
- Put the event on the button. Meta's event setup tool can add events to buttons without code, which is useful when people click but stay on the same page. Meta notes a button event fires on every click whether or not the action completes. For a download, the click is close to the action itself.
- Confirm it before you spend. Visit the page or click the button, then check that the custom conversion shows as Active in the Custom conversions tab of Events Manager. The Test Events check shows the event arrive live.
Why clicks were the wrong goal
Our point on the call was that optimizing for clicks brings anyone who clicks, including a lot of people with no interest in the product. Meta calls the optimization event the outcome its system bids on, and it learns to show ads to the people most likely to produce it. Point it at the download and it looks for people who download. On that account, the existing ad set didn't offer the new conversion as a goal, so we set up a new campaign on the Leads objective. For the same problem with embedded forms, see why iframe forms hide conversions from the pixel.
The takeaways
- URL-rule custom conversions on All URL traffic count the pixel's Page view events.
- A link straight to a file loads no page, so the custom conversion never fires.
- Route downloads through a page with the pixel, or add a button event with the event setup tool.
- Use URL contains, and check the custom conversion shows Active before you optimize for it.
- Optimize for the download, not the click. Meta finds more of whatever you choose.
Common questions
Why is my Meta custom conversion not recording any events?
If it uses All URL traffic with a URL rule, it counts Page view events from your pixel on matching URLs. Meta says the page must have the pixel base code with the page view event. A URL that is a file, not a web page, never fires that event.
How do I track file downloads with the Meta pixel?
Either send the download click to a page on your own domain that has the pixel and then starts the download, and build the custom conversion on that page's URL, or add an event to the download button with Meta's event setup tool, which can add events to buttons without code.
Should I use URL contains or URL equals for a Meta custom conversion?
Meta suggests URL contains with the minimum part of the URL that identifies the page. URL equals only counts an exact match, so extra text such as UTM parameters, http instead of https or a trailing slash means no conversion.
How do I know a Meta custom conversion is working?
After creating it, visit the page it references to trigger it, then check the Custom conversions tab in Events Manager. A working custom conversion shows as Active. The Test Events tool shows pixel events live as you use the site.
Why shouldn't I optimize Meta ads for link clicks?
Meta learns to show ads to the people most likely to take the action you optimize for. Optimize for clicks and it finds people who click, which isn't the same as people who download or buy.