Skip to content

Instantly share code, notes, and snippets.

@wyrfel
Created March 28, 2018 00:38
Show Gist options
  • Save wyrfel/03ff17d7ae4abfa7d9703eb595d592e3 to your computer and use it in GitHub Desktop.
Save wyrfel/03ff17d7ae4abfa7d9703eb595d592e3 to your computer and use it in GitHub Desktop.
fn.fbq - load-script
function () {
return function () {
var fbq = window.fbq;
if (!fbq) {
!function(f,b){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];}(window,document);
{{fn.load-script}}(‘//connect.facebook.net/en_US/fbevents.js’);
fbq = window.fbq;
fbq('init', '...');
}
return fbq.apply(window, arguments);
}
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment