Add Facebook Pixel

This commit is contained in:
Ronan Le Pivaingt 2017-12-05 15:57:48 +01:00
parent 8be9f5e4df
commit db6f593e68
1 changed files with 29 additions and 0 deletions

View File

@ -1718,3 +1718,32 @@ tarteaucitron.services.xiti_smarttag = {
}
}
};
// facebook pixel
tarteaucitron.services.facebookpixel = {
"key": "facebookpixel",
"type": "ads",
"name": "Facebook Pixel",
"uri": "https://fr-fr.facebook.com/business/help/www/651294705016616",
"needConsent": true,
"cookies": ['datr', 'fr', 'reg_ext_ref', 'reg_fb_gate', 'reg_fb_ref', 'sb', 'wd', 'x-src'],
"js": function () {
"use strict";
var n;
if(window.fbq)return;
n=window.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)} ;
if(!window._fbq)window._fbq=n;
n.push=n;
n.loaded=!0;
n.version='2.0';
n.queue=[];
tarteaucitron.addScript('https://connect.facebook.net/en_US/fbevents.js');
fbq('init', tarteaucitron.user.facebookpixelId);
fbq('track', 'PageView');
if (typeof tarteaucitron.user.facebookpixelMore === 'function') {
tarteaucitron.user.facebookpixelMore();
}
}
};