How Do You Implement Facebook Conversion Pixel On "Event"

1 replies
How to implement pixel firing dynamically when action is performed like button click by visitor? I think in Google Analytics this is known as "Event" and currently I want to make conversion pixel to know when visitor opt- in by clicking button on newsletter subscription form.

I heard about "jQuery Cookie" but I am not a programmer to know how to implement this. I can edit WordPress themes to insert scripts but maybe there is WordPress plugin that allows to add event-trogger functionality to any interactable element on webpage to fire conversion pixel?

Thanks
#conversion #event #facebook #implement #pixel
  • Profile picture of the author emptee
    Hi Boris,

    I'm not aware of any event based triggers at the moment - but it's easy enough to rig them up

    Cookie libraries (eg. jQuery cookie plugin) aren't going to help you here, as you don't own facebook.com..

    Just hook the button/link and dynamically create/load the pixel - it's pretty straight forward, something like this would work:

    jQuery('#mybutton').click(function(){
    jQuery('body').append(jQuery('<img src="http://facebook.com.....">'));
    });

    Alternatively, just throw the pixel onto a "thank you" page..

    Cheers,
    Michael
    {{ DiscussionBoard.errors[10069289].message }}

Trending Topics