Adding a Facebook tracking pixel in the CMS

Form what I can see there isn’t an easy way/ existing module that allows CMS users and Marketers to add Facebook tracking pixels to individual pages and blogs.
Is there a module (planned or live) out there that does this well? Unlike Google Analytics tracking, Facebook pixels are unique for every Ad and so need to be added frequently, something a developer shouldn’t have to do every time.

Any help or insight is much appreciated :slight_smile:

JJ

I could be wrong - but I think you only need one Pixel per ad account, not per ad. So most websites would only need one pixel, the same on every page. In that case you can add a script to every page by using the Requirements API to add your script to the Page class.

If you really want to be able to put arbitrary scripts on any page, a developer could whip up a field to let you paste in codes, but adding javascript in the CMS is maybe not ideal for security/stability.

Anything wrong with just adding a db text field “FBTracker” to \Page and then spewing it in the footer of your template “$FBTracker.RAW”?

Blog posts extends \Page so that should cover blogs as well

I import Shopify products into Silverstripe, there is a Shopify facebook pixel app in my store that sets to work with purchase events with that products, this app no longer working in silverstripe, is there any way to sort out this issue?