irinas2211
It's possible to track each button click as a conversion in Facebook.
Important - First load Facebook Pixel code that you want to fire on page load (example code):
<!-- Facebook Pixel Code -->
<script>
fbq('track', 'ViewContent', {
content_name: 'Really Fast Running Shoes',
content_category: 'Apparel & Accessories > Shoes',
content_ids: ['1234'],
content_type: 'product',
value: 0.50,
currency: 'USD'
});
</script>
<!-- End Facebook Pixel Code -->
Then you will need to check the css class of your button first:
- Go to your website in Buttonizer
- Right click in on the button and click on 'inspect'
- Copy the css class of the button
- In this case it will be 'button-desktop-1'
- Add the following code to your website and change CLASSNAME into the buttonizer classname
- You can also change content_name in the code etc. You can view these values in your Facebook ad account
- Important: The AddToCart is a standard event in Facebook. In the following link (https://www.facebook.com/business/help/402791146561655) you can view all the standard even options.
<!-- Add Pixel Events to the button's click handler -->
<script type="text/javascript">
var button = document.getElementByClassName('CLASSNAME');
button.addEventListener(
'click',
function() {
fbq('track', 'AddToCart', {
content_name: 'Really Fast Running Shoes',
content_category: 'Apparel & Accessories > Shoes',
content_ids: ['1234'],
content_type: 'product',
value: 4.99,
currency: 'USD'
});
},
false
);
</script>