twhitaker,
This plugin inserts the code you enter into the metabox fields, nothing less and nothing more. So you could start with a block of code like this: http://jonloomer-nrwebdevelopment.netdna-ssl.com/wp-content/uploads/2015/07/Facebook-Upgraded-Pixel-Structure.jpg
That’ll track the basic PageView event. If you also wanted to track the AddToCart event, underneath the fbq(‘track’,’PageView’); you can add this line:
fbq('track','AddToCart');
…and the same goes for adding any of Facebook’s other standard events to the page.
One more note:
Just be sure you’re using your own pixel ID in the code above – see the two highlighted areas in this image: http://jonloomer-nrwebdevelopment.netdna-ssl.com/wp-content/uploads/2015/07/Facebook-Upgraded-Pixel-Base-Code.jpg
Hello Kellen,
I was testing your plugin and it actually inserts the pixel code inside the <head> section of a page. But I am a little confused here, perhaps you can please help me: The Pixel Code Base, which should be in all head section of every page. I installed it through Insert Headers and Footers plugin.
Now, if I want to install the Event Code on a Thank You page, I can add the Conversion Tracking code as shown in your image. My question is: if the base code is already on that Thank You page, will your plugin copy again another base code (along with the Conversion Tracking code)? Will that be ok having two repeated codes (one with the base code only, and the other the base code with the conversion tracking) in the head?
For Event codes, there is another way Facebook gives us, which is adding the event code e.g. [fbq(‘track’, ‘Search’);] just below the <head/> tag of the Thank You page (or any other page). Your plugin would be even better if we could have an option to choose the method to use for adding event codes.
Thanks,
Marco
Hi Marco,
Facebook Conversion Pixel is built to output one block of code (base code and any page-specific code) per page. If you’re interested in a plugin that inserts the base code site-wide allows you to insert standard event code on specific pages, I would recommend using this one: https://ww.wp.xz.cn/plugins/pixelyoursite/
Hope that helps out. Take care,
Kellen