I’d like to insert a facebook remarketing pixel into a single event so people who visit that event on my website receive facebook ads for that particular event. How can I add a pixel to a particular event?
I assume you want to target people regardless of purchasing or not?
You could use the AHEE_event_details_after_post hook to target single events. As you want it only for a specific event, you will need to call global $post and check the post (event) ID matches the one you want.
Something liek this (please note this is just an example!):
function fbpixel() {
global $post;
//if event ID is not 21, bail.
if($post->ID != 21 ) {
return false;
}
?>
FACEBOOK SCRIPT GOES HERE
<?php
}
add_action('AHEE_event_details_after_post','fbpixel');
Viewing 1 reply thread
The support post ‘Remarketing pixel for an event’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.