Is there a callback functionality for Facebook conversion events similar to Google Analytics?

As of today, Facebook still does not support it.
However, since I had this issue due to immediate redirect, I used the following solution:

basically I set on localStorage the variable I needed to track =>

 window.localStorage.setItem('documentTitle', document.title);

then I did the redirect, and on the targeted page I used the following to properly track fb event

if (typeof(fbq) !== 'undefined' && window.localStorage.getItem('documentTitle')) {
    fbq('track', 'Lead', {content_name: window.localStorage.getItem('documentTitle')});
    window.localStorage.removeItem('documentTitle');}

Hope this helps someone 😉

PS: this will work only if the redirected page is on the same host of the initial page, since localStorage is unique per: protocol://host:port

Leave a Comment