Define Custom Facebook Pixel URL

Bronze Contributor
Bronze Contributor

In one of our applications, a specific page that has a query string where we'd like to either edit or remove one specific parameter or remove the query string altogether before sending an event to Facebook/Meta.  However, the tag documentation from FB doesn't seem to support defining a custom URL to send along with the events.

In the Facebook connector script itself, it appears to set the 'dl' parameter as location.href and doesn't look for any other value besides that.

Does anyone know if this is possible? I've thought about setting a custom event instead of the standard ones but I don't think that will avoid the issue of the pixel capturing the location.href. I could also try using an image pixel but that's not a desirable solution.

2 REPLIES 2

Define Custom Facebook Pixel URL

Tealium Employee

Hi Michael,

I did some testing on my end and if I were to map the "dl" parameter, the Facebook script adds it as a "custom dimension" instead of overriding the URL.

cd[dl]: https://www.testurl.com

The Facebook script sets the "dl" parameter from their code innately, so it doesn't appear to allow any sort of overrides. I was also unable to find any examples in their documentation showing a URL override. The "dl" mapping works server-side because you need to send that value over instead of it being generated by their "fbevents.js" script.

Thanks,

Jen

Jen Kaye
Senior Premium Success Engineer | Tealium, Inc.

Define Custom Facebook Pixel URL

Bronze Contributor
Bronze Contributor

Thank you Jennifer.

Public