Meta / Facebook Pixel

Advantage+ catalog ads are dynamically created by populating an ad template with product information found in a data feed. This allows you to create thousands of ads without having to configure each of them individually. You can also use Advantage+ catalog ads to target visitors based on how they have interacted with your website in the past.

 

Requirements

  • You must have a Facebook Page for the business that your Advantage+ catalog ads will apply to.
  • The Pixel base code must already be installed.
  • You must have access to the Facebook Ads Manager.

 

Standard Events

Before you can set up Advantage+ catalog ads, you must first be tracking the followingstandard events. You must also include a parameter object with specific object properties with each tracked event.

Required Event Required Object Properties

AddToCart

content_typeand eithercontent_idsorcontents

Purchase

content_typeand eithercontent_idsorcontents

ViewContent

content_typeand eithercontent_idsorcontents

 

Click Event

window.addEventListener('message', function(message) {
    if (message.data && message.data.event_type === 'spottButtonAction') {

    	console.log(message.data);
    	
        fbq('track',
            'ViewContent', {
                content_name: message.data.event_data.asset?.name,
                content_category: message.data.event_data.asset?.customFields?.category,
                content_ids: [message.data.event_data.asset?.id],
                content_type: 'product',
                value: message.data.event_data.asset?.customFields?.price,
                currency: message.data.event_data.asset?.customFields?.currency
            });
    }
});

Interaction Event

window.addEventListener('message', function(message) {
    if (message.data && message.data.event_type === 'spottInteractionEvent') {

    	console.log(message.data);
    	
        fbq('track',
            'ViewContent', {
                content_name: message.data.event_data.asset?.name,
                content_category: message.data.event_data.asset?.customFields?.category,
                content_ids: [message.data.event_data.asset?.id],
                content_type: 'product',
                value: message.data.event_data.asset?.customFields?.price,
                currency: message.data.event_data.asset?.customFields?.currency
            });
    }
});
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.