Viewing 2 replies - 1 through 2 (of 2 total)
  • Chad,

    When users are directed to a pdf, like the link you shared, WordPress isn’t actually being loaded at all; the user’s browser is just displaying that media file directly. Consequently, it’s not possible to insert any JavaScript code, including FB Pixel code, on media pages such as that.

    A work-around would be to use a plugin like Embed PDF or vanilla-pdf-embed to embed your pdf into a page, and set that page to be your new successful registration page. Then you could use the Facebook Conversion Pixel plugin to add conversion pixel code to that page. I hope that helps out. Thanks for your interest in using my plugin ??

    Another option would be to take the text, image & button from your pdf and instead make a web page out of them. Then you could send users to that page upon successful registration, and insert conversion pixel code into it, as well. The benefit to this method would be faster page load time, since you wouldn’t need to load up a plugin just to display an embedded pdf.

    P.S. If you have found this helpful and have a second, I’d appreciate a 5-star review on the plugin page. Thanks ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to add pixel to a media page’ is closed to new replies.