tarteaucitron.services.js 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077
  1. /*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit, FB, ferankReady, IN, stButtons*/
  2. /*jslint regexp: true, nomen: true*/
  3. // addthis
  4. tarteaucitron.services.addthis = {
  5. "key": "addthis",
  6. "type": "social",
  7. "name": "AddThis",
  8. "uri": "http://www.addthis.com/privacy/privacy-policy#publisher-visitors",
  9. "needConsent": true,
  10. "cookies": ['__atuvc', '__atuvs'],
  11. "js": function () {
  12. "use strict";
  13. if (tarteaucitron.user.addthisPubId === undefined) {
  14. return;
  15. }
  16. if (tarteaucitron.isAjax === true) {
  17. window.addthis = null;
  18. window._adr = null;
  19. window._atc = null;
  20. window._atd = null;
  21. window._ate = null;
  22. window._atr = null;
  23. window._atw = null;
  24. }
  25. tarteaucitron.fallback(['addthis_sharing_toolbox'], '');
  26. tarteaucitron.addScript('//s7.addthis.com/js/300/addthis_widget.js#pubid=' + tarteaucitron.user.addthisPubId);
  27. },
  28. "fallback": function () {
  29. "use strict";
  30. var id = 'addthis';
  31. tarteaucitron.fallback(['addthis_sharing_toolbox'], tarteaucitron.engage(id));
  32. }
  33. };
  34. // addtoanyfeed
  35. tarteaucitron.services.addtoanyfeed = {
  36. "key": "addtoanyfeed",
  37. "type": "social",
  38. "name": "AddToAny (feed)",
  39. "uri": "https://www.addtoany.com/privacy",
  40. "needConsent": true,
  41. "cookies": [],
  42. "js": function () {
  43. "use strict";
  44. if (tarteaucitron.user.addtoanyfeedUri === undefined) {
  45. return;
  46. }
  47. tarteaucitron.user.addtoanyfeedSubscribeLink = 'https://www.addtoany.com/subscribe?linkurl=' + tarteaucitron.user.addtoanyfeedUri;
  48. window.a2a_config = window.a2a_config || {};
  49. window.a2a_config.linkurl = tarteaucitron.user.addtoanyfeedUri;
  50. tarteaucitron.addScript('//static.addtoany.com/menu/feed.js');
  51. },
  52. "fallback": function () {
  53. "use strict";
  54. tarteaucitron.user.addtoanyfeedSubscribeLink = 'https://www.addtoany.com/subscribe?linkurl=' + tarteaucitron.user.addtoanyfeedUri;
  55. }
  56. };
  57. // addtoanyshare
  58. tarteaucitron.services.addtoanyshare = {
  59. "key": "addtoanyshare",
  60. "type": "social",
  61. "name": "AddToAny (share)",
  62. "uri": "https://www.addtoany.com/privacy",
  63. "needConsent": true,
  64. "cookies": [],
  65. "js": function () {
  66. "use strict";
  67. tarteaucitron.fallback(['tac_addtoanyshare'], '');
  68. tarteaucitron.addScript('//static.addtoany.com/menu/page.js');
  69. },
  70. "fallback": function () {
  71. "use strict";
  72. var id = 'addtoanyshare';
  73. tarteaucitron.fallback(['tac_addtoanyshare'], tarteaucitron.engage(id));
  74. }
  75. };
  76. // alexa
  77. tarteaucitron.services.alexa = {
  78. "key": "alexa",
  79. "type": "analytic",
  80. "name": "Alexa",
  81. "uri": "http://www.alexa.com/help/privacy",
  82. "needConsent": true,
  83. "cookies": ['__asc', '__auc'],
  84. "js": function () {
  85. "use strict";
  86. if (tarteaucitron.user.alexaAccountID === undefined) {
  87. return;
  88. }
  89. window._atrk_opts = {
  90. atrk_acct: tarteaucitron.user.alexaAccountID,
  91. domain: window.location.hostname.match(/[^\.]*\.[^.]*$/)[0],
  92. dynamic: true
  93. };
  94. tarteaucitron.addScript('https://d31qbv1cthcecs.cloudfront.net/atrk.js');
  95. }
  96. };
  97. // amazon
  98. tarteaucitron.services.amazon = {
  99. "key": "amazon",
  100. "type": "ads",
  101. "name": "Amazon",
  102. "uri": "http://www.amazon.fr/gp/help/customer/display.html?ie=UTF8&*Version*=1&*entries*=0&nodeId=201149360",
  103. "needConsent": true,
  104. "cookies": [],
  105. "js": function () {
  106. "use strict";
  107. tarteaucitron.fallback(['amazon_product'], function (x) {
  108. var amazonId = x.getAttribute("amazonid"),
  109. productId = x.getAttribute("productid"),
  110. url = '//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=' + tarteaucitron.getLanguage().toUpperCase() + '&source=ss&ref=ss_til&ad_type=product_link&tracking_id=' + amazonId + '&marketplace=amazon&region=' + tarteaucitron.getLanguage().toUpperCase() + '&placement=' + productId + '&asins=' + productId + '&show_border=true&link_opens_in_new_window=true',
  111. iframe = '<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="' + url + '"></iframe>';
  112. return iframe;
  113. });
  114. },
  115. "fallback": function () {
  116. "use strict";
  117. var id = 'amazon';
  118. tarteaucitron.fallback(['amazon_product'], tarteaucitron.engage(id));
  119. }
  120. };
  121. // clicky
  122. tarteaucitron.services.clicky = {
  123. "key": "clicky",
  124. "type": "analytic",
  125. "name": "Clicky",
  126. "uri": "https://clicky.com/terms",
  127. "needConsent": true,
  128. "cookies": ['_jsuid', '_eventqueue', '_referrer_og', '_utm_og', '_first_pageview', 'clicky_olark', 'no_trackyy_' + tarteaucitron.user.clickyId, 'unpoco_' + tarteaucitron.user.clickyId, 'heatmaps_g2g_' + tarteaucitron.user.clickyId],
  129. "js": function () {
  130. "use strict";
  131. if (tarteaucitron.user.clickyId === undefined) {
  132. return;
  133. }
  134. tarteaucitron.addScript('//static.getclicky.com/js', '', function () {
  135. if (typeof clicky.init === 'function') {
  136. clicky.init(tarteaucitron.user.clickyId);
  137. }
  138. if (typeof tarteaucitron.user.clickyMore === 'function') {
  139. tarteaucitron.user.clickyMore();
  140. }
  141. });
  142. }
  143. };
  144. // clicmanager
  145. tarteaucitron.services.clicmanager = {
  146. "key": "clicmanager",
  147. "type": "ads",
  148. "name": "Clicmanager",
  149. "uri": "http://www.clicmanager.fr/infos_legales.php",
  150. "needConsent": true,
  151. "cookies": [],
  152. "js": function () {
  153. "use strict";
  154. var uniqIds = [],
  155. i,
  156. uri;
  157. tarteaucitron.fallback(['clicmanager-canvas'], function (x) {
  158. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  159. uniqIds.push(uniqId);
  160. return '<div id="' + uniqId + '" c="' + x.getAttribute('c') + '" s="' + x.getAttribute('s') + '" t="' + x.getAttribute('t') + '"></div>';
  161. });
  162. for (i = 0; i < uniqIds.length; i += 1) {
  163. uri = '//ads.clicmanager.fr/exe.php?';
  164. uri += 'c=' + document.getElementById(uniqIds[i]).getAttribute('c') + '&';
  165. uri += 's=' + document.getElementById(uniqIds[i]).getAttribute('s') + '&';
  166. uri += 't=' + document.getElementById(uniqIds[i]).getAttribute('t');
  167. tarteaucitron.makeAsync.init(uri, uniqIds[i]);
  168. }
  169. },
  170. "fallback": function () {
  171. "use strict";
  172. var id = 'clicmanager';
  173. tarteaucitron.fallback(['clicmanager-canvas'], tarteaucitron.engage(id));
  174. }
  175. };
  176. // criteo
  177. tarteaucitron.services.criteo = {
  178. "key": "criteo",
  179. "type": "ads",
  180. "name": "Criteo",
  181. "uri": "http://www.criteo.com/privacy/",
  182. "needConsent": true,
  183. "cookies": [],
  184. "js": function () {
  185. "use strict";
  186. document.MAX_ct0 = '';
  187. var uniqIds = [],
  188. i,
  189. uri;
  190. tarteaucitron.fallback(['criteo-canvas'], function (x) {
  191. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  192. uniqIds.push(uniqId);
  193. return '<div id="' + uniqId + '" zoneid="' + x.getAttribute('zoneid') + '"></div>';
  194. });
  195. for (i = 0; i < uniqIds.length; i += 1) {
  196. uri = '//cas.criteo.com/delivery/ajs.php?';
  197. uri += 'zoneid=' + document.getElementById(uniqIds[i]).getAttribute('zoneid');
  198. uri += '&nodis=1&cb=' + Math.floor(Math.random() * 99999999999);
  199. uri += '&loc=' + encodeURI(window.location);
  200. uri += (document.MAX_used !== ',') ? '&exclude=' + document.MAX_used : '';
  201. uri += (document.charset !== undefined ? '&charset=' + document.charset : '');
  202. uri += (document.characterSet !== undefined ? '&charset=' + document.characterSet : '');
  203. uri += (document.referrer !== undefined) ? '&referer=' + encodeURI(document.referrer) : '';
  204. uri += (document.context !== undefined) ? '&context=' + encodeURI(document.context) : '';
  205. uri += ((document.MAX_ct0 !== undefined) && (document.MAX_ct0.substring(0, 4) === 'http')) ? '&ct0=' + encodeURI(document.MAX_ct0) : '';
  206. uri += (document.mmm_fo !== undefined) ? '&mmm_fo=1' : '';
  207. tarteaucitron.makeAsync.init(uri, uniqIds[i]);
  208. }
  209. },
  210. "fallback": function () {
  211. "use strict";
  212. var id = 'criteo';
  213. tarteaucitron.fallback(['criteo-canvas'], tarteaucitron.engage(id));
  214. }
  215. };
  216. // dailymotion
  217. tarteaucitron.services.dailymotion = {
  218. "key": "dailymotion",
  219. "type": "video",
  220. "name": "Dailymotion",
  221. "uri": "http://www.dailymotion.com/legal/privacy",
  222. "needConsent": true,
  223. "cookies": ['ts', 'dmvk', 'hist', 'v1st', 's_vi'],
  224. "js": function () {
  225. "use strict";
  226. tarteaucitron.fallback(['dailymotion_player'], function (x) {
  227. var video_id = x.getAttribute("videoID"),
  228. video_width = x.getAttribute("width"),
  229. frame_width = 'width=',
  230. video_height = x.getAttribute("height"),
  231. frame_height = 'height=',
  232. video_frame,
  233. params = 'info=' + x.getAttribute("showinfo") + '&autoPlay=' + x.getAttribute("autoplay");
  234. if (video_id === undefined) {
  235. return "";
  236. }
  237. if (video_width !== undefined) {
  238. frame_width += '"' + video_width + '" ';
  239. } else {
  240. frame_width += '"" ';
  241. }
  242. if (video_height !== undefined) {
  243. frame_height += '"' + video_height + '" ';
  244. } else {
  245. frame_height += '"" ';
  246. }
  247. video_frame = '<iframe src="//www.dailymotion.com/embed/video/' + video_id + '?' + params + '" ' + frame_width + frame_height + ' frameborder="0" allowfullscreen></iframe>';
  248. return video_frame;
  249. });
  250. },
  251. "fallback": function () {
  252. "use strict";
  253. var id = 'dailymotion';
  254. tarteaucitron.fallback(['dailymotion_player'], tarteaucitron.engage(id));
  255. }
  256. };
  257. // disqus
  258. tarteaucitron.services.disqus = {
  259. "key": "disqus",
  260. "type": "comment",
  261. "name": "Disqus",
  262. "uri": "https://help.disqus.com/customer/portal/articles/466259-privacy-policy",
  263. "needConsent": true,
  264. "cookies": [],
  265. "js": function () {
  266. "use strict";
  267. if (tarteaucitron.user.disqusShortname === undefined) {
  268. return;
  269. }
  270. tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/embed.js');
  271. tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/count.js');
  272. },
  273. "fallback": function () {
  274. "use strict";
  275. var id = 'disqus';
  276. if (document.getElementById('disqus_thread')) {
  277. document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id);
  278. }
  279. }
  280. };
  281. // facebook
  282. tarteaucitron.services.facebook = {
  283. "key": "facebook",
  284. "type": "social",
  285. "name": "Facebook",
  286. "uri": "https://www.facebook.com/help/cookies/",
  287. "needConsent": true,
  288. "cookies": [],
  289. "js": function () {
  290. "use strict";
  291. tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], '');
  292. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  293. if (tarteaucitron.isAjax === true) {
  294. if (typeof FB !== "undefined") {
  295. FB.XFBML.parse();
  296. }
  297. }
  298. },
  299. "fallback": function () {
  300. "use strict";
  301. var id = 'facebook';
  302. tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], tarteaucitron.engage(id));
  303. }
  304. };
  305. // facebooklikebox
  306. tarteaucitron.services.facebooklikebox = {
  307. "key": "facebooklikebox",
  308. "type": "social",
  309. "name": "Facebook (like box)",
  310. "uri": "https://www.facebook.com/help/cookies/",
  311. "needConsent": true,
  312. "cookies": [],
  313. "js": function () {
  314. "use strict";
  315. tarteaucitron.fallback(['fb-like-box'], '');
  316. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  317. if (tarteaucitron.isAjax === true) {
  318. if (typeof FB !== "undefined") {
  319. FB.XFBML.parse();
  320. }
  321. }
  322. },
  323. "fallback": function () {
  324. "use strict";
  325. var id = 'facebooklikebox';
  326. tarteaucitron.fallback(['fb-like-box'], tarteaucitron.engage(id));
  327. }
  328. };
  329. // facebookcomment
  330. tarteaucitron.services.facebookcomment = {
  331. "key": "facebookcomment",
  332. "type": "comment",
  333. "name": "Facebook (commentaire)",
  334. "uri": "https://www.facebook.com/help/cookies/",
  335. "needConsent": true,
  336. "cookies": [],
  337. "js": function () {
  338. "use strict";
  339. tarteaucitron.fallback(['fb-comments'], '');
  340. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  341. if (tarteaucitron.isAjax === true) {
  342. if (typeof FB !== "undefined") {
  343. FB.XFBML.parse();
  344. }
  345. }
  346. },
  347. "fallback": function () {
  348. "use strict";
  349. var id = 'facebookcomment';
  350. tarteaucitron.fallback(['fb-comments'], tarteaucitron.engage(id));
  351. }
  352. };
  353. // ferank
  354. tarteaucitron.services.ferank = {
  355. "key": "ferank",
  356. "type": "analytic",
  357. "name": "FERank",
  358. "uri": "https://www.ferank.fr/respect-vie-privee/#mesureaudience",
  359. "needConsent": false,
  360. "cookies": [],
  361. "js": function () {
  362. "use strict";
  363. tarteaucitron.addScript('//static.ferank.fr/pixel.js', '', function () {
  364. if (typeof tarteaucitron.user.ferankMore === 'function') {
  365. tarteaucitron.user.ferankMore();
  366. }
  367. });
  368. }
  369. };
  370. // ferank pub
  371. tarteaucitron.services.ferankpub = {
  372. "key": "ferankpub",
  373. "type": "ads",
  374. "name": "FERank (pub)",
  375. "uri": "https://www.ferank.fr/respect-vie-privee/#regiepublicitaire",
  376. "needConsent": false,
  377. "cookies": [],
  378. "js": function () {
  379. "use strict";
  380. tarteaucitron.addScript('//static.ferank.fr/publicite.async.js');
  381. if (tarteaucitron.isAjax === true) {
  382. if (typeof ferankReady === 'function') {
  383. ferankReady();
  384. }
  385. }
  386. },
  387. "fallback": function () {
  388. "use strict";
  389. var id = 'ferankpub';
  390. tarteaucitron.fallback(['ferank-publicite'], tarteaucitron.engage(id));
  391. }
  392. };
  393. // google+
  394. tarteaucitron.services.gplus = {
  395. "key": "gplus",
  396. "type": "social",
  397. "name": "Google+",
  398. "uri": "http://www.google.fr/intl/policies/privacy/",
  399. "needConsent": true,
  400. "cookies": [],
  401. "js": function () {
  402. "use strict";
  403. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  404. },
  405. "fallback": function () {
  406. "use strict";
  407. var id = 'gplus';
  408. tarteaucitron.fallback(['g-plus', 'g-plusone'], tarteaucitron.engage(id));
  409. }
  410. };
  411. // google+ badge
  412. tarteaucitron.services.gplusbadge = {
  413. "key": "gplusbadge",
  414. "type": "social",
  415. "name": "Google+ (badge)",
  416. "uri": "http://www.google.fr/intl/policies/privacy/",
  417. "needConsent": true,
  418. "cookies": [],
  419. "js": function () {
  420. "use strict";
  421. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  422. },
  423. "fallback": function () {
  424. "use strict";
  425. var id = 'gplusbadge';
  426. tarteaucitron.fallback(['g-page', 'g-person'], tarteaucitron.engage(id));
  427. }
  428. };
  429. // google adsense
  430. tarteaucitron.services.adsense = {
  431. "key": "adsense",
  432. "type": "ads",
  433. "name": "Google Adsense",
  434. "uri": "http://www.google.com/ads/preferences/",
  435. "needConsent": true,
  436. "cookies": [],
  437. "js": function () {
  438. "use strict";
  439. tarteaucitron.addScript('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
  440. },
  441. "fallback": function () {
  442. "use strict";
  443. var id = 'adsense';
  444. tarteaucitron.fallback(['adsbygoogle'], tarteaucitron.engage(id));
  445. }
  446. };
  447. // google adsense search (form)
  448. tarteaucitron.services.adsensesearchform = {
  449. "key": "adsensesearchform",
  450. "type": "ads",
  451. "name": "Google Adsense Search (form)",
  452. "uri": "http://www.google.com/ads/preferences/",
  453. "needConsent": true,
  454. "cookies": [],
  455. "js": function () {
  456. "use strict";
  457. tarteaucitron.addScript('//www.google.com/coop/cse/brand?form=cse-search-box&lang=' + tarteaucitron.getLanguage());
  458. }
  459. };
  460. // google adsense search (result)
  461. tarteaucitron.services.adsensesearchresult = {
  462. "key": "adsensesearchresult",
  463. "type": "ads",
  464. "name": "Google Adsense Search (result)",
  465. "uri": "http://www.google.com/ads/preferences/",
  466. "needConsent": true,
  467. "cookies": [],
  468. "js": function () {
  469. "use strict";
  470. if (tarteaucitron.user.adsensesearchresultCx === undefined) {
  471. return;
  472. }
  473. tarteaucitron.addScript('//www.google.com/cse/cse.js?cx=' + tarteaucitron.user.adsensesearchresultCx);
  474. },
  475. "fallback": function () {
  476. "use strict";
  477. var id = 'adsensesearchresult';
  478. if (document.getElementById('gcse_searchresults')) {
  479. document.getElementById('gcse_searchresults').innerHTML = tarteaucitron.engage(id);
  480. }
  481. }
  482. };
  483. // googleadwordsconversion
  484. tarteaucitron.services.googleadwordsconversion = {
  485. "key": "googleadwordsconversion",
  486. "type": "ads",
  487. "name": "Google Adwords (conversion)",
  488. "uri": "https://www.google.com/settings/ads",
  489. "needConsent": true,
  490. "cookies": [],
  491. "js": function () {
  492. "use strict";
  493. if (tarteaucitron.user.adwordsconversionId === undefined) {
  494. return;
  495. }
  496. tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
  497. window.google_trackConversion({
  498. google_conversion_id: tarteaucitron.user.adwordsconversionId,
  499. google_conversion_label: tarteaucitron.user.adwordsconversionLabel,
  500. google_custom_params: {
  501. parameter1: tarteaucitron.user.adwordsconversionCustom1,
  502. parameter2: tarteaucitron.user.adwordsconversionCustom2
  503. }
  504. });
  505. });
  506. }
  507. };
  508. // googleadwordsremarketing
  509. tarteaucitron.services.googleadwordsremarketing = {
  510. "key": "googleadwordsremarketing",
  511. "type": "ads",
  512. "name": "Google Adwords (remarketing)",
  513. "uri": "https://www.google.com/settings/ads",
  514. "needConsent": true,
  515. "cookies": [],
  516. "js": function () {
  517. "use strict";
  518. if (tarteaucitron.user.adwordsremarketingId === undefined) {
  519. return;
  520. }
  521. tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
  522. window.google_trackConversion({
  523. google_conversion_id: tarteaucitron.user.adwordsremarketingId,
  524. google_remarketing_only: true
  525. });
  526. });
  527. }
  528. };
  529. // google analytics (old)
  530. tarteaucitron.services.gajs = {
  531. "key": "gajs",
  532. "type": "analytic",
  533. "name": "Google Analytics (ga.js)",
  534. "uri": "https://support.google.com/analytics/answer/6004245",
  535. "needConsent": true,
  536. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  537. "js": function () {
  538. "use strict";
  539. window._gaq = window._gaq || [];
  540. window._gaq.push(['_setAccount', tarteaucitron.user.gajsUa]);
  541. window._gaq.push(['_trackPageview']);
  542. tarteaucitron.addScript('//www.google-analytics.com/ga.js', '', function () {
  543. if (typeof tarteaucitron.user.gajsMore === 'function') {
  544. tarteaucitron.user.gajsMore();
  545. }
  546. });
  547. }
  548. };
  549. // google analytics
  550. tarteaucitron.services.analytics = {
  551. "key": "analytics",
  552. "type": "analytic",
  553. "name": "Google Analytics (universal)",
  554. "uri": "https://support.google.com/analytics/answer/6004245",
  555. "needConsent": true,
  556. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  557. "js": function () {
  558. "use strict";
  559. window.GoogleAnalyticsObject = 'ga';
  560. window.ga = window.ga || function () {
  561. window.ga.q = window.ga.q || [];
  562. window.ga.q.push(arguments);
  563. };
  564. window.ga.l = new Date();
  565. tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
  566. ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
  567. ga('send', 'pageview');
  568. if (typeof tarteaucitron.user.analyticsMore === 'function') {
  569. tarteaucitron.user.analyticsMore();
  570. }
  571. });
  572. }
  573. };
  574. // google maps
  575. tarteaucitron.services.googlemaps = {
  576. "key": "googlemaps",
  577. "type": "api",
  578. "name": "Google Maps",
  579. "uri": "http://www.google.com/ads/preferences/",
  580. "needConsent": true,
  581. "cookies": [],
  582. "js": function () {
  583. "use strict";
  584. var mapOptions,
  585. map,
  586. uniqIds = [],
  587. i;
  588. if (tarteaucitron.user.googlemapsApiKey === undefined) {
  589. return;
  590. }
  591. tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=tac_googlemaps_callback&key=' + tarteaucitron.user.googlemapsApiKey);
  592. window.tac_googlemaps_callback = function () {
  593. tarteaucitron.fallback(['googlemaps-canvas'], function (x) {
  594. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  595. uniqIds.push(uniqId);
  596. return '<div id="' + uniqId + '" zoom="' + x.getAttribute('zoom') + '" latitude="' + x.getAttribute('latitude') + '" longitude="' + x.getAttribute('longitude') + '" style="width:' + x.offsetWidth + 'px;height:' + x.offsetHeight + 'px"></div>';
  597. });
  598. for (i = 0; i < uniqIds.length; i += 1) {
  599. mapOptions = {
  600. zoom: parseInt(document.getElementById(uniqIds[i]).getAttribute('zoom'), 10),
  601. center: new google.maps.LatLng(parseFloat(document.getElementById(uniqIds[i]).getAttribute('latitude'), 10), parseFloat(document.getElementById(uniqIds[i]).getAttribute('longitude'), 10))
  602. };
  603. map = new google.maps.Map(document.getElementById(uniqIds[i]), mapOptions);
  604. }
  605. };
  606. },
  607. "fallback": function () {
  608. "use strict";
  609. var id = 'googlemaps';
  610. tarteaucitron.fallback(['googlemaps-canvas'], tarteaucitron.engage(id));
  611. }
  612. };
  613. // google tag manager
  614. tarteaucitron.services.googletagmanager = {
  615. "key": "googletagmanager",
  616. "type": "api",
  617. "name": "Google Tag Manager",
  618. "uri": "http://www.google.com/ads/preferences/",
  619. "needConsent": true,
  620. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', '__gads', '_drt_', 'FLC', 'exchange_uid', 'id', 'fc', 'rrs', 'rds', 'rv', 'uid', 'UIDR', 'UID', 'clid', 'ipinfo', 'acs'],
  621. "js": function () {
  622. "use strict";
  623. if (tarteaucitron.user.googletagmanagerId === undefined) {
  624. return;
  625. }
  626. window.dataLayer = window.dataLayer || [];
  627. window.dataLayer.push({
  628. 'gtm.start': new Date().getTime(),
  629. event: 'gtm.js'
  630. });
  631. tarteaucitron.addScript('//www.googletagmanager.com/gtm.js?id=' + tarteaucitron.user.googletagmanagerId);
  632. }
  633. };
  634. // jsapi
  635. tarteaucitron.services.jsapi = {
  636. "key": "jsapi",
  637. "type": "api",
  638. "name": "Google jsapi",
  639. "uri": "http://www.google.com/policies/privacy/",
  640. "needConsent": true,
  641. "cookies": [],
  642. "js": function () {
  643. "use strict";
  644. tarteaucitron.addScript('//www.google.com/jsapi');
  645. }
  646. };
  647. // linkedin
  648. tarteaucitron.services.linkedin = {
  649. "key": "linkedin",
  650. "type": "social",
  651. "name": "Linkedin",
  652. "uri": "https://www.linkedin.com/legal/cookie_policy",
  653. "needConsent": true,
  654. "cookies": [],
  655. "js": function () {
  656. "use strict";
  657. tarteaucitron.fallback(['tacLinkedin'], '');
  658. tarteaucitron.addScript('//platform.linkedin.com/in.js');
  659. if (tarteaucitron.isAjax === true) {
  660. if (typeof IN !== "undefined") {
  661. IN.parse();
  662. }
  663. }
  664. },
  665. "fallback": function () {
  666. "use strict";
  667. var id = 'linkedin';
  668. tarteaucitron.fallback(['tacLinkedin'], tarteaucitron.engage(id));
  669. }
  670. };
  671. // pinterest
  672. tarteaucitron.services.pinterest = {
  673. "key": "pinterest",
  674. "type": "social",
  675. "name": "Pinterest",
  676. "uri": "https://about.pinterest.com/privacy-policy",
  677. "needConsent": true,
  678. "cookies": [],
  679. "js": function () {
  680. "use strict";
  681. tarteaucitron.fallback(['tacPinterest'], '');
  682. tarteaucitron.addScript('//assets.pinterest.com/js/pinit.js');
  683. },
  684. "fallback": function () {
  685. "use strict";
  686. var id = 'pinterest';
  687. tarteaucitron.fallback(['tacPinterest'], tarteaucitron.engage(id));
  688. }
  689. };
  690. // pubdirecte
  691. tarteaucitron.services.pubdirecte = {
  692. "key": "pubdirecte",
  693. "type": "ads",
  694. "name": "Pubdirecte",
  695. "uri": "http://pubdirecte.com/contact.php",
  696. "needConsent": true,
  697. "cookies": [],
  698. "js": function () {
  699. "use strict";
  700. var uniqIds = [],
  701. i,
  702. uri;
  703. tarteaucitron.fallback(['pubdirecte-canvas'], function (x) {
  704. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  705. uniqIds.push(uniqId);
  706. return '<div id="' + uniqId + '" pid="' + x.getAttribute('pid') + '" ref="' + x.getAttribute('ref') + '"></div>';
  707. });
  708. for (i = 0; i < uniqIds.length; i += 1) {
  709. uri = '//www.pubdirecte.com/script/banniere.php?';
  710. uri += 'id=' + document.getElementById(uniqIds[i]).getAttribute('pid') + '&';
  711. uri += 'ref=' + document.getElementById(uniqIds[i]).getAttribute('ref');
  712. tarteaucitron.makeAsync.init(uri, uniqIds[i]);
  713. }
  714. },
  715. "fallback": function () {
  716. "use strict";
  717. var id = 'pubdirecte';
  718. tarteaucitron.fallback(['pubdirecte-canvas'], tarteaucitron.engage(id));
  719. }
  720. };
  721. // shareaholic
  722. tarteaucitron.services.shareaholic = {
  723. "key": "shareaholic",
  724. "type": "social",
  725. "name": "Shareaholic",
  726. "uri": "https://shareaholic.com/privacy/choices",
  727. "needConsent": true,
  728. "cookies": ['__utma', '__utmb', '__utmc', '__utmz', '__utmt_Shareaholic%20Pageviews'],
  729. "js": function () {
  730. "use strict";
  731. if (tarteaucitron.user.shareaholicSiteId === undefined) {
  732. return;
  733. }
  734. tarteaucitron.fallback(['shareaholic-canvas'], '');
  735. tarteaucitron.addScript('//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js', '', function () {
  736. try {
  737. Shareaholic.init(tarteaucitron.user.shareaholicSiteId);
  738. } catch (e) {}
  739. });
  740. },
  741. "fallback": function () {
  742. "use strict";
  743. var id = 'shareaholic';
  744. tarteaucitron.fallback(['shareaholic-canvas'], tarteaucitron.engage(id));
  745. }
  746. };
  747. // sharethis
  748. tarteaucitron.services.sharethis = {
  749. "key": "sharethis",
  750. "type": "social",
  751. "name": "ShareThis",
  752. "uri": "http://www.sharethis.com/legal/privacy/",
  753. "needConsent": true,
  754. "cookies": ['__unam'],
  755. "js": function () {
  756. "use strict";
  757. if (tarteaucitron.user.sharethisPublisher === undefined) {
  758. return;
  759. }
  760. var switchTo5x = true,
  761. uri = ('https:' === document.location.protocol ? 'https://ws' : 'http://w') + '.sharethis.com/button/buttons.js';
  762. tarteaucitron.fallback(['tacSharethis'], '');
  763. tarteaucitron.addScript(uri, '', function () {
  764. stLight.options({publisher: tarteaucitron.user.sharethisPublisher, doNotHash: false, doNotCopy: false, hashAddressBar: false});
  765. });
  766. if (tarteaucitron.isAjax === true) {
  767. if (typeof stButtons !== "undefined") {
  768. stButtons.locateElements();
  769. }
  770. }
  771. },
  772. "fallback": function () {
  773. "use strict";
  774. var id = 'sharethis';
  775. tarteaucitron.fallback(['tacSharethis'], tarteaucitron.engage(id));
  776. }
  777. };
  778. // typekit
  779. tarteaucitron.services.typekit = {
  780. "key": "typekit",
  781. "type": "api",
  782. "name": "Typekit (adobe)",
  783. "uri": "http://www.adobe.com/fr/privacy.html",
  784. "needConsent": true,
  785. "cookies": [],
  786. "js": function () {
  787. "use strict";
  788. if (tarteaucitron.user.typekitId === undefined) {
  789. return;
  790. }
  791. tarteaucitron.addScript('//use.typekit.net/' + tarteaucitron.user.typekitId + '.js', '', function () {
  792. try {
  793. Typekit.load();
  794. } catch (e) {}
  795. });
  796. }
  797. };
  798. // twitter
  799. tarteaucitron.services.twitter = {
  800. "key": "twitter",
  801. "type": "social",
  802. "name": "Twitter",
  803. "uri": "https://support.twitter.com/articles/20170514",
  804. "needConsent": true,
  805. "cookies": [],
  806. "js": function () {
  807. "use strict";
  808. tarteaucitron.fallback(['tacTwitter'], '');
  809. tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
  810. },
  811. "fallback": function () {
  812. "use strict";
  813. var id = 'twitter';
  814. tarteaucitron.fallback(['tacTwitter'], tarteaucitron.engage(id));
  815. }
  816. };
  817. // user voice
  818. tarteaucitron.services.uservoice = {
  819. "key": "uservoice",
  820. "type": "support",
  821. "name": "UserVoice",
  822. "uri": "https://www.uservoice.com/privacy/",
  823. "needConsent": true,
  824. "cookies": [],
  825. "js": function () {
  826. "use strict";
  827. if (tarteaucitron.user.userVoiceApi === undefined) {
  828. return;
  829. }
  830. tarteaucitron.addScript('//widget.uservoice.com/' + tarteaucitron.user.userVoiceApi + '.js');
  831. }
  832. };
  833. // vimeo
  834. tarteaucitron.services.vimeo = {
  835. "key": "vimeo",
  836. "type": "video",
  837. "name": "Vimeo",
  838. "uri": "http://vimeo.com/privacy",
  839. "needConsent": true,
  840. "cookies": ['__utmt_player', '__utma', '__utmb', '__utmc', '__utmv', 'vuid', '__utmz', 'player'],
  841. "js": function () {
  842. "use strict";
  843. tarteaucitron.fallback(['vimeo_player'], function (x) {
  844. var video_id = x.getAttribute("videoID"),
  845. video_width = x.getAttribute("width"),
  846. frame_width = 'width=',
  847. video_height = x.getAttribute("height"),
  848. frame_height = 'height=',
  849. video_frame;
  850. if (video_id === undefined) {
  851. return "";
  852. }
  853. if (video_width !== undefined) {
  854. frame_width += '"' + video_width + '" ';
  855. } else {
  856. frame_width += '"" ';
  857. }
  858. if (video_height !== undefined) {
  859. frame_height += '"' + video_height + '" ';
  860. } else {
  861. frame_height += '"" ';
  862. }
  863. video_frame = '<iframe src="//player.vimeo.com/video/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
  864. return video_frame;
  865. });
  866. },
  867. "fallback": function () {
  868. "use strict";
  869. var id = 'vimeo';
  870. tarteaucitron.fallback(['vimeo_player'], tarteaucitron.engage(id));
  871. }
  872. };
  873. // visualrevenue
  874. tarteaucitron.services.visualrevenue = {
  875. "key": "visualrevenue",
  876. "type": "analytic",
  877. "name": "VisualRevenue",
  878. "uri": "http://www.outbrain.com/legal/privacy-713/",
  879. "needConsent": true,
  880. "cookies": ['__vrf', '__vrm', '__vrl', '__vry', '__vru', '__vrid', '__vrz'],
  881. "js": function () {
  882. "use strict";
  883. if (tarteaucitron.user.visualrevenueId === undefined) {
  884. return;
  885. }
  886. window._vrq = window._vrq || [];
  887. window._vrq.push(['id', tarteaucitron.user.visualrevenueId]);
  888. window._vrq.push(['automate', true]);
  889. window._vrq.push(['track', function () {}]);
  890. tarteaucitron.addScript('http://a.visualrevenue.com/vrs.js');
  891. }
  892. };
  893. // vshop
  894. tarteaucitron.services.vshop = {
  895. "key": "vshop",
  896. "type": "ads",
  897. "name": "vShop",
  898. "uri": "http://vshop.fr/privacy-policy",
  899. "needConsent": true,
  900. "cookies": [],
  901. "js": function () {
  902. "use strict";
  903. tarteaucitron.fallback(['vcashW'], '');
  904. tarteaucitron.addScript('//vshop.fr/js/w.js');
  905. },
  906. "fallback": function () {
  907. "use strict";
  908. var id = 'vshop';
  909. tarteaucitron.fallback(['vcashW'], tarteaucitron.engage(id));
  910. }
  911. };
  912. // xiti
  913. tarteaucitron.services.xiti = {
  914. "key": "xiti",
  915. "type": "analytic",
  916. "name": "Xiti",
  917. "uri": "http://www.atinternet.com/politique-du-respect-de-la-vie-privee/",
  918. "needConsent": true,
  919. "cookies": [],
  920. "js": function () {
  921. "use strict";
  922. if (tarteaucitron.user.xitiId === undefined) {
  923. return;
  924. }
  925. var Xt_param = 's=' + tarteaucitron.user.xitiId + '&p=',
  926. Xt_r,
  927. Xt_h,
  928. Xt_i,
  929. Xt_s,
  930. div = document.createElement('div');
  931. try {
  932. Xt_r = top.document.referrer;
  933. } catch (e) {
  934. Xt_r = document.referrer;
  935. }
  936. Xt_h = new Date();
  937. Xt_i = '<img style="display:none" border="0" alt="" ';
  938. Xt_i += 'src="http://logv3.xiti.com/hit.xiti?' + Xt_param;
  939. Xt_i += '&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
  940. if (parseFloat(navigator.appVersion) >= 4) {
  941. Xt_s = screen;
  942. Xt_i += '&r=' + Xt_s.width + 'x' + Xt_s.height + 'x' + Xt_s.pixelDepth + 'x' + Xt_s.colorDepth;
  943. }
  944. div.innerHTML = Xt_i + '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$') + '" title="Internet Audience">';
  945. document.getElementsByTagName('body')[0].appendChild(div.firstChild);
  946. if (typeof tarteaucitron.user.xitiMore === 'function') {
  947. tarteaucitron.user.xitiMore();
  948. }
  949. }
  950. };
  951. // youtube
  952. tarteaucitron.services.youtube = {
  953. "key": "youtube",
  954. "type": "video",
  955. "name": "YouTube",
  956. "uri": "https://www.google.fr/intl/fr/policies/privacy/",
  957. "needConsent": true,
  958. "cookies": ['VISITOR_INFO1_LIVE', 'YSC', 'PREF', 'GEUP'],
  959. "js": function () {
  960. "use strict";
  961. tarteaucitron.fallback(['youtube_player'], function (x) {
  962. var video_id = x.getAttribute("videoID"),
  963. video_width = x.getAttribute("width"),
  964. frame_width = 'width=',
  965. video_height = x.getAttribute("height"),
  966. frame_height = 'height=',
  967. video_frame,
  968. params = 'theme=' + x.getAttribute("theme") + '&rel=' + x.getAttribute("rel") + '&controls=' + x.getAttribute("controls") + '&showinfo=' + x.getAttribute("showinfo") + '&autoplay=' + x.getAttribute("autoplay");
  969. if (video_id === undefined) {
  970. return "";
  971. }
  972. if (video_width !== undefined) {
  973. frame_width += '"' + video_width + '" ';
  974. } else {
  975. frame_width += '"" ';
  976. }
  977. if (video_height !== undefined) {
  978. frame_height += '"' + video_height + '" ';
  979. } else {
  980. frame_height += '"" ';
  981. }
  982. video_frame = '<iframe type="text/html" ' + frame_width + frame_height + ' src="//www.youtube-nocookie.com/embed/' + video_id + '?' + params + '" frameborder="0"></iframe>';
  983. return video_frame;
  984. });
  985. },
  986. "fallback": function () {
  987. "use strict";
  988. var id = 'youtube';
  989. tarteaucitron.fallback(['youtube_player'], tarteaucitron.engage(id));
  990. }
  991. };
  992. // zopim
  993. tarteaucitron.services.zopim = {
  994. "key": "zopim",
  995. "type": "support",
  996. "name": "Zopim",
  997. "uri": "https://www.zopim.com/privacy",
  998. "needConsent": true,
  999. "cookies": ['__zlcid', '__zprivacy'],
  1000. "js": function () {
  1001. "use strict";
  1002. if (tarteaucitron.user.zopimID === undefined) {
  1003. return;
  1004. }
  1005. tarteaucitron.addScript('//v2.zopim.com/?' + tarteaucitron.user.zopimID);
  1006. }
  1007. };