tarteaucitron.services.js 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261
  1. /*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit, FB, ferankReady, IN, stButtons, twttr*/
  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. // calameo
  122. tarteaucitron.services.calameo = {
  123. "key": "calameo",
  124. "type": "video",
  125. "name": "Calameo",
  126. "uri": "http://fr.calameo.com/privacy",
  127. "needConsent": true,
  128. "cookies": [],
  129. "js": function () {
  130. "use strict";
  131. tarteaucitron.fallback(['calameo-canvas'], function (x) {
  132. var id = x.getAttribute("data-id"),
  133. width = x.getAttribute("width"),
  134. height = x.getAttribute("height"),
  135. url = '//v.calameo.com/?bkcode=' + id;
  136. return '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" allowtransparency allowfullscreen></iframe>';
  137. });
  138. },
  139. "fallback": function () {
  140. "use strict";
  141. var id = 'calameo';
  142. tarteaucitron.fallback(['calameo-canvas'], tarteaucitron.engage(id));
  143. }
  144. };
  145. // clicky
  146. tarteaucitron.services.clicky = {
  147. "key": "clicky",
  148. "type": "analytic",
  149. "name": "Clicky",
  150. "uri": "https://clicky.com/terms",
  151. "needConsent": true,
  152. "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],
  153. "js": function () {
  154. "use strict";
  155. if (tarteaucitron.user.clickyId === undefined) {
  156. return;
  157. }
  158. tarteaucitron.addScript('//static.getclicky.com/js', '', function () {
  159. if (typeof clicky.init === 'function') {
  160. clicky.init(tarteaucitron.user.clickyId);
  161. }
  162. if (typeof tarteaucitron.user.clickyMore === 'function') {
  163. tarteaucitron.user.clickyMore();
  164. }
  165. });
  166. }
  167. };
  168. // clicmanager
  169. tarteaucitron.services.clicmanager = {
  170. "key": "clicmanager",
  171. "type": "ads",
  172. "name": "Clicmanager",
  173. "uri": "http://www.clicmanager.fr/infos_legales.php",
  174. "needConsent": true,
  175. "cookies": [],
  176. "js": function () {
  177. "use strict";
  178. var uniqIds = [],
  179. i,
  180. uri;
  181. tarteaucitron.fallback(['clicmanager-canvas'], function (x) {
  182. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  183. uniqIds.push(uniqId);
  184. return '<div id="' + uniqId + '" c="' + x.getAttribute('c') + '" s="' + x.getAttribute('s') + '" t="' + x.getAttribute('t') + '"></div>';
  185. });
  186. for (i = 0; i < uniqIds.length; i += 1) {
  187. uri = '//ads.clicmanager.fr/exe.php?';
  188. uri += 'c=' + document.getElementById(uniqIds[i]).getAttribute('c') + '&';
  189. uri += 's=' + document.getElementById(uniqIds[i]).getAttribute('s') + '&';
  190. uri += 't=' + document.getElementById(uniqIds[i]).getAttribute('t');
  191. tarteaucitron.makeAsync.init(uri, uniqIds[i]);
  192. }
  193. },
  194. "fallback": function () {
  195. "use strict";
  196. var id = 'clicmanager';
  197. tarteaucitron.fallback(['clicmanager-canvas'], tarteaucitron.engage(id));
  198. }
  199. };
  200. // criteo
  201. tarteaucitron.services.criteo = {
  202. "key": "criteo",
  203. "type": "ads",
  204. "name": "Criteo",
  205. "uri": "http://www.criteo.com/privacy/",
  206. "needConsent": true,
  207. "cookies": [],
  208. "js": function () {
  209. "use strict";
  210. document.MAX_ct0 = '';
  211. var uniqIds = [],
  212. i,
  213. uri;
  214. tarteaucitron.fallback(['criteo-canvas'], function (x) {
  215. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  216. uniqIds.push(uniqId);
  217. return '<div id="' + uniqId + '" zoneid="' + x.getAttribute('zoneid') + '"></div>';
  218. });
  219. for (i = 0; i < uniqIds.length; i += 1) {
  220. uri = '//cas.criteo.com/delivery/ajs.php?';
  221. uri += 'zoneid=' + document.getElementById(uniqIds[i]).getAttribute('zoneid');
  222. uri += '&nodis=1&cb=' + Math.floor(Math.random() * 99999999999);
  223. uri += '&loc=' + encodeURI(window.location);
  224. uri += (document.MAX_used !== ',') ? '&exclude=' + document.MAX_used : '';
  225. uri += (document.charset !== undefined ? '&charset=' + document.charset : '');
  226. uri += (document.characterSet !== undefined ? '&charset=' + document.characterSet : '');
  227. uri += (document.referrer !== undefined) ? '&referer=' + encodeURI(document.referrer) : '';
  228. uri += (document.context !== undefined) ? '&context=' + encodeURI(document.context) : '';
  229. uri += ((document.MAX_ct0 !== undefined) && (document.MAX_ct0.substring(0, 4) === 'http')) ? '&ct0=' + encodeURI(document.MAX_ct0) : '';
  230. uri += (document.mmm_fo !== undefined) ? '&mmm_fo=1' : '';
  231. tarteaucitron.makeAsync.init(uri, uniqIds[i]);
  232. }
  233. },
  234. "fallback": function () {
  235. "use strict";
  236. var id = 'criteo';
  237. tarteaucitron.fallback(['criteo-canvas'], tarteaucitron.engage(id));
  238. }
  239. };
  240. // dailymotion
  241. tarteaucitron.services.dailymotion = {
  242. "key": "dailymotion",
  243. "type": "video",
  244. "name": "Dailymotion",
  245. "uri": "http://www.dailymotion.com/legal/privacy",
  246. "needConsent": true,
  247. "cookies": ['ts', 'dmvk', 'hist', 'v1st', 's_vi'],
  248. "js": function () {
  249. "use strict";
  250. tarteaucitron.fallback(['dailymotion_player'], function (x) {
  251. var video_id = x.getAttribute("videoID"),
  252. video_width = x.getAttribute("width"),
  253. frame_width = 'width=',
  254. video_height = x.getAttribute("height"),
  255. frame_height = 'height=',
  256. video_frame,
  257. params = 'info=' + x.getAttribute("showinfo") + '&autoPlay=' + x.getAttribute("autoplay");
  258. if (video_id === undefined) {
  259. return "";
  260. }
  261. if (video_width !== undefined) {
  262. frame_width += '"' + video_width + '" ';
  263. } else {
  264. frame_width += '"" ';
  265. }
  266. if (video_height !== undefined) {
  267. frame_height += '"' + video_height + '" ';
  268. } else {
  269. frame_height += '"" ';
  270. }
  271. video_frame = '<iframe src="//www.dailymotion.com/embed/video/' + video_id + '?' + params + '" ' + frame_width + frame_height + ' frameborder="0" allowfullscreen></iframe>';
  272. return video_frame;
  273. });
  274. },
  275. "fallback": function () {
  276. "use strict";
  277. var id = 'dailymotion';
  278. tarteaucitron.fallback(['dailymotion_player'], tarteaucitron.engage(id));
  279. }
  280. };
  281. // disqus
  282. tarteaucitron.services.disqus = {
  283. "key": "disqus",
  284. "type": "comment",
  285. "name": "Disqus",
  286. "uri": "https://help.disqus.com/customer/portal/articles/466259-privacy-policy",
  287. "needConsent": true,
  288. "cookies": [],
  289. "js": function () {
  290. "use strict";
  291. if (tarteaucitron.user.disqusShortname === undefined) {
  292. return;
  293. }
  294. tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/embed.js');
  295. tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/count.js');
  296. },
  297. "fallback": function () {
  298. "use strict";
  299. var id = 'disqus';
  300. if (document.getElementById('disqus_thread')) {
  301. document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id);
  302. }
  303. }
  304. };
  305. // facebook
  306. tarteaucitron.services.facebook = {
  307. "key": "facebook",
  308. "type": "social",
  309. "name": "Facebook",
  310. "uri": "https://www.facebook.com/help/cookies/",
  311. "needConsent": true,
  312. "cookies": [],
  313. "js": function () {
  314. "use strict";
  315. tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], '');
  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 = 'facebook';
  326. tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], tarteaucitron.engage(id));
  327. }
  328. };
  329. // facebooklikebox
  330. tarteaucitron.services.facebooklikebox = {
  331. "key": "facebooklikebox",
  332. "type": "social",
  333. "name": "Facebook (like box)",
  334. "uri": "https://www.facebook.com/help/cookies/",
  335. "needConsent": true,
  336. "cookies": [],
  337. "js": function () {
  338. "use strict";
  339. tarteaucitron.fallback(['fb-like-box'], '');
  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 = 'facebooklikebox';
  350. tarteaucitron.fallback(['fb-like-box'], tarteaucitron.engage(id));
  351. }
  352. };
  353. // facebookcomment
  354. tarteaucitron.services.facebookcomment = {
  355. "key": "facebookcomment",
  356. "type": "comment",
  357. "name": "Facebook (commentaire)",
  358. "uri": "https://www.facebook.com/help/cookies/",
  359. "needConsent": true,
  360. "cookies": [],
  361. "js": function () {
  362. "use strict";
  363. tarteaucitron.fallback(['fb-comments'], '');
  364. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  365. if (tarteaucitron.isAjax === true) {
  366. if (typeof FB !== "undefined") {
  367. FB.XFBML.parse();
  368. }
  369. }
  370. },
  371. "fallback": function () {
  372. "use strict";
  373. var id = 'facebookcomment';
  374. tarteaucitron.fallback(['fb-comments'], tarteaucitron.engage(id));
  375. }
  376. };
  377. // ferank
  378. tarteaucitron.services.ferank = {
  379. "key": "ferank",
  380. "type": "analytic",
  381. "name": "FERank",
  382. "uri": "https://www.ferank.fr/respect-vie-privee/#mesureaudience",
  383. "needConsent": false,
  384. "cookies": [],
  385. "js": function () {
  386. "use strict";
  387. tarteaucitron.addScript('//static.ferank.fr/pixel.js', '', function () {
  388. if (typeof tarteaucitron.user.ferankMore === 'function') {
  389. tarteaucitron.user.ferankMore();
  390. }
  391. });
  392. }
  393. };
  394. // ferank pub
  395. tarteaucitron.services.ferankpub = {
  396. "key": "ferankpub",
  397. "type": "ads",
  398. "name": "FERank (pub)",
  399. "uri": "https://www.ferank.fr/respect-vie-privee/#regiepublicitaire",
  400. "needConsent": false,
  401. "cookies": [],
  402. "js": function () {
  403. "use strict";
  404. tarteaucitron.addScript('//static.ferank.fr/publicite.async.js');
  405. if (tarteaucitron.isAjax === true) {
  406. if (typeof ferankReady === 'function') {
  407. ferankReady();
  408. }
  409. }
  410. },
  411. "fallback": function () {
  412. "use strict";
  413. var id = 'ferankpub';
  414. tarteaucitron.fallback(['ferank-publicite'], tarteaucitron.engage(id));
  415. }
  416. };
  417. // google+
  418. tarteaucitron.services.gplus = {
  419. "key": "gplus",
  420. "type": "social",
  421. "name": "Google+",
  422. "uri": "http://www.google.fr/intl/policies/privacy/",
  423. "needConsent": true,
  424. "cookies": [],
  425. "js": function () {
  426. "use strict";
  427. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  428. },
  429. "fallback": function () {
  430. "use strict";
  431. var id = 'gplus';
  432. tarteaucitron.fallback(['g-plus', 'g-plusone'], tarteaucitron.engage(id));
  433. }
  434. };
  435. // google+ badge
  436. tarteaucitron.services.gplusbadge = {
  437. "key": "gplusbadge",
  438. "type": "social",
  439. "name": "Google+ (badge)",
  440. "uri": "http://www.google.fr/intl/policies/privacy/",
  441. "needConsent": true,
  442. "cookies": [],
  443. "js": function () {
  444. "use strict";
  445. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  446. },
  447. "fallback": function () {
  448. "use strict";
  449. var id = 'gplusbadge';
  450. tarteaucitron.fallback(['g-page', 'g-person'], tarteaucitron.engage(id));
  451. }
  452. };
  453. // google adsense
  454. tarteaucitron.services.adsense = {
  455. "key": "adsense",
  456. "type": "ads",
  457. "name": "Google Adsense",
  458. "uri": "http://www.google.com/ads/preferences/",
  459. "needConsent": true,
  460. "cookies": [],
  461. "js": function () {
  462. "use strict";
  463. tarteaucitron.addScript('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
  464. },
  465. "fallback": function () {
  466. "use strict";
  467. var id = 'adsense';
  468. tarteaucitron.fallback(['adsbygoogle'], tarteaucitron.engage(id));
  469. }
  470. };
  471. // google adsense search (form)
  472. tarteaucitron.services.adsensesearchform = {
  473. "key": "adsensesearchform",
  474. "type": "ads",
  475. "name": "Google Adsense Search (form)",
  476. "uri": "http://www.google.com/ads/preferences/",
  477. "needConsent": true,
  478. "cookies": [],
  479. "js": function () {
  480. "use strict";
  481. tarteaucitron.addScript('//www.google.com/coop/cse/brand?form=cse-search-box&lang=' + tarteaucitron.getLanguage());
  482. }
  483. };
  484. // google adsense search (result)
  485. tarteaucitron.services.adsensesearchresult = {
  486. "key": "adsensesearchresult",
  487. "type": "ads",
  488. "name": "Google Adsense Search (result)",
  489. "uri": "http://www.google.com/ads/preferences/",
  490. "needConsent": true,
  491. "cookies": [],
  492. "js": function () {
  493. "use strict";
  494. if (tarteaucitron.user.adsensesearchresultCx === undefined) {
  495. return;
  496. }
  497. tarteaucitron.addScript('//www.google.com/cse/cse.js?cx=' + tarteaucitron.user.adsensesearchresultCx);
  498. },
  499. "fallback": function () {
  500. "use strict";
  501. var id = 'adsensesearchresult';
  502. if (document.getElementById('gcse_searchresults')) {
  503. document.getElementById('gcse_searchresults').innerHTML = tarteaucitron.engage(id);
  504. }
  505. }
  506. };
  507. // googleadwordsconversion
  508. tarteaucitron.services.googleadwordsconversion = {
  509. "key": "googleadwordsconversion",
  510. "type": "ads",
  511. "name": "Google Adwords (conversion)",
  512. "uri": "https://www.google.com/settings/ads",
  513. "needConsent": true,
  514. "cookies": [],
  515. "js": function () {
  516. "use strict";
  517. if (tarteaucitron.user.adwordsconversionId === undefined) {
  518. return;
  519. }
  520. tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
  521. window.google_trackConversion({
  522. google_conversion_id: tarteaucitron.user.adwordsconversionId,
  523. google_conversion_label: tarteaucitron.user.adwordsconversionLabel,
  524. google_custom_params: {
  525. parameter1: tarteaucitron.user.adwordsconversionCustom1,
  526. parameter2: tarteaucitron.user.adwordsconversionCustom2
  527. }
  528. });
  529. });
  530. }
  531. };
  532. // googleadwordsremarketing
  533. tarteaucitron.services.googleadwordsremarketing = {
  534. "key": "googleadwordsremarketing",
  535. "type": "ads",
  536. "name": "Google Adwords (remarketing)",
  537. "uri": "https://www.google.com/settings/ads",
  538. "needConsent": true,
  539. "cookies": [],
  540. "js": function () {
  541. "use strict";
  542. if (tarteaucitron.user.adwordsremarketingId === undefined) {
  543. return;
  544. }
  545. tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
  546. window.google_trackConversion({
  547. google_conversion_id: tarteaucitron.user.adwordsremarketingId,
  548. google_remarketing_only: true
  549. });
  550. });
  551. }
  552. };
  553. // google analytics (old)
  554. tarteaucitron.services.gajs = {
  555. "key": "gajs",
  556. "type": "analytic",
  557. "name": "Google Analytics (ga.js)",
  558. "uri": "https://support.google.com/analytics/answer/6004245",
  559. "needConsent": true,
  560. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  561. "js": function () {
  562. "use strict";
  563. window._gaq = window._gaq || [];
  564. window._gaq.push(['_setAccount', tarteaucitron.user.gajsUa]);
  565. window._gaq.push(['_trackPageview']);
  566. tarteaucitron.addScript('//www.google-analytics.com/ga.js', '', function () {
  567. if (typeof tarteaucitron.user.gajsMore === 'function') {
  568. tarteaucitron.user.gajsMore();
  569. }
  570. });
  571. }
  572. };
  573. // google analytics
  574. tarteaucitron.services.analytics = {
  575. "key": "analytics",
  576. "type": "analytic",
  577. "name": "Google Analytics (universal)",
  578. "uri": "https://support.google.com/analytics/answer/6004245",
  579. "needConsent": true,
  580. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  581. "js": function () {
  582. "use strict";
  583. window.GoogleAnalyticsObject = 'ga';
  584. window.ga = window.ga || function () {
  585. window.ga.q = window.ga.q || [];
  586. window.ga.q.push(arguments);
  587. };
  588. window.ga.l = new Date();
  589. tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
  590. ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
  591. ga('send', 'pageview');
  592. if (typeof tarteaucitron.user.analyticsMore === 'function') {
  593. tarteaucitron.user.analyticsMore();
  594. }
  595. });
  596. }
  597. };
  598. // google maps
  599. tarteaucitron.services.googlemaps = {
  600. "key": "googlemaps",
  601. "type": "api",
  602. "name": "Google Maps",
  603. "uri": "http://www.google.com/ads/preferences/",
  604. "needConsent": true,
  605. "cookies": [],
  606. "js": function () {
  607. "use strict";
  608. var mapOptions,
  609. map,
  610. uniqIds = [],
  611. i;
  612. if (tarteaucitron.user.googlemapsApiKey === undefined) {
  613. return;
  614. }
  615. tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=tac_googlemaps_callback&key=' + tarteaucitron.user.googlemapsApiKey);
  616. window.tac_googlemaps_callback = function () {
  617. tarteaucitron.fallback(['googlemaps-canvas'], function (x) {
  618. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  619. uniqIds.push(uniqId);
  620. 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>';
  621. });
  622. for (i = 0; i < uniqIds.length; i += 1) {
  623. mapOptions = {
  624. zoom: parseInt(document.getElementById(uniqIds[i]).getAttribute('zoom'), 10),
  625. center: new google.maps.LatLng(parseFloat(document.getElementById(uniqIds[i]).getAttribute('latitude'), 10), parseFloat(document.getElementById(uniqIds[i]).getAttribute('longitude'), 10))
  626. };
  627. map = new google.maps.Map(document.getElementById(uniqIds[i]), mapOptions);
  628. }
  629. };
  630. },
  631. "fallback": function () {
  632. "use strict";
  633. var id = 'googlemaps';
  634. tarteaucitron.fallback(['googlemaps-canvas'], tarteaucitron.engage(id));
  635. }
  636. };
  637. // google tag manager
  638. tarteaucitron.services.googletagmanager = {
  639. "key": "googletagmanager",
  640. "type": "api",
  641. "name": "Google Tag Manager",
  642. "uri": "http://www.google.com/ads/preferences/",
  643. "needConsent": true,
  644. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', '__gads', '_drt_', 'FLC', 'exchange_uid', 'id', 'fc', 'rrs', 'rds', 'rv', 'uid', 'UIDR', 'UID', 'clid', 'ipinfo', 'acs'],
  645. "js": function () {
  646. "use strict";
  647. if (tarteaucitron.user.googletagmanagerId === undefined) {
  648. return;
  649. }
  650. window.dataLayer = window.dataLayer || [];
  651. window.dataLayer.push({
  652. 'gtm.start': new Date().getTime(),
  653. event: 'gtm.js'
  654. });
  655. tarteaucitron.addScript('//www.googletagmanager.com/gtm.js?id=' + tarteaucitron.user.googletagmanagerId);
  656. }
  657. };
  658. // jsapi
  659. tarteaucitron.services.jsapi = {
  660. "key": "jsapi",
  661. "type": "api",
  662. "name": "Google jsapi",
  663. "uri": "http://www.google.com/policies/privacy/",
  664. "needConsent": true,
  665. "cookies": [],
  666. "js": function () {
  667. "use strict";
  668. tarteaucitron.addScript('//www.google.com/jsapi');
  669. }
  670. };
  671. // linkedin
  672. tarteaucitron.services.linkedin = {
  673. "key": "linkedin",
  674. "type": "social",
  675. "name": "Linkedin",
  676. "uri": "https://www.linkedin.com/legal/cookie_policy",
  677. "needConsent": true,
  678. "cookies": [],
  679. "js": function () {
  680. "use strict";
  681. tarteaucitron.fallback(['tacLinkedin'], '');
  682. tarteaucitron.addScript('//platform.linkedin.com/in.js');
  683. if (tarteaucitron.isAjax === true) {
  684. if (typeof IN !== "undefined") {
  685. IN.parse();
  686. }
  687. }
  688. },
  689. "fallback": function () {
  690. "use strict";
  691. var id = 'linkedin';
  692. tarteaucitron.fallback(['tacLinkedin'], tarteaucitron.engage(id));
  693. }
  694. };
  695. // pinterest
  696. tarteaucitron.services.pinterest = {
  697. "key": "pinterest",
  698. "type": "social",
  699. "name": "Pinterest",
  700. "uri": "https://about.pinterest.com/privacy-policy",
  701. "needConsent": true,
  702. "cookies": [],
  703. "js": function () {
  704. "use strict";
  705. tarteaucitron.fallback(['tacPinterest'], '');
  706. tarteaucitron.addScript('//assets.pinterest.com/js/pinit.js');
  707. },
  708. "fallback": function () {
  709. "use strict";
  710. var id = 'pinterest';
  711. tarteaucitron.fallback(['tacPinterest'], tarteaucitron.engage(id));
  712. }
  713. };
  714. // prezi
  715. tarteaucitron.services.prezi = {
  716. "key": "prezi",
  717. "type": "video",
  718. "name": "Prezi",
  719. "uri": "https://prezi.com/privacy-policy/",
  720. "needConsent": true,
  721. "cookies": [],
  722. "js": function () {
  723. "use strict";
  724. tarteaucitron.fallback(['prezi-canvas'], function (x) {
  725. var id = x.getAttribute("data-id"),
  726. width = x.getAttribute("width"),
  727. height = x.getAttribute("height"),
  728. url = 'https://prezi.com/embed/' + id + '/?bgcolor=ffffff&amp;lock_to_path=0&amp;autoplay=0&amp;autohide_ctrls=0';
  729. return '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" allowtransparency allowfullscreen></iframe>';
  730. });
  731. },
  732. "fallback": function () {
  733. "use strict";
  734. var id = 'prezi';
  735. tarteaucitron.fallback(['prezi-canvas'], tarteaucitron.engage(id));
  736. }
  737. };
  738. // pubdirecte
  739. tarteaucitron.services.pubdirecte = {
  740. "key": "pubdirecte",
  741. "type": "ads",
  742. "name": "Pubdirecte",
  743. "uri": "http://pubdirecte.com/contact.php",
  744. "needConsent": true,
  745. "cookies": [],
  746. "js": function () {
  747. "use strict";
  748. var uniqIds = [],
  749. i,
  750. uri;
  751. tarteaucitron.fallback(['pubdirecte-canvas'], function (x) {
  752. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  753. uniqIds.push(uniqId);
  754. return '<div id="' + uniqId + '" pid="' + x.getAttribute('pid') + '" ref="' + x.getAttribute('ref') + '"></div>';
  755. });
  756. for (i = 0; i < uniqIds.length; i += 1) {
  757. uri = '//www.pubdirecte.com/script/banniere.php?';
  758. uri += 'id=' + document.getElementById(uniqIds[i]).getAttribute('pid') + '&';
  759. uri += 'ref=' + document.getElementById(uniqIds[i]).getAttribute('ref');
  760. tarteaucitron.makeAsync.init(uri, uniqIds[i]);
  761. }
  762. },
  763. "fallback": function () {
  764. "use strict";
  765. var id = 'pubdirecte';
  766. tarteaucitron.fallback(['pubdirecte-canvas'], tarteaucitron.engage(id));
  767. }
  768. };
  769. // shareaholic
  770. tarteaucitron.services.shareaholic = {
  771. "key": "shareaholic",
  772. "type": "social",
  773. "name": "Shareaholic",
  774. "uri": "https://shareaholic.com/privacy/choices",
  775. "needConsent": true,
  776. "cookies": ['__utma', '__utmb', '__utmc', '__utmz', '__utmt_Shareaholic%20Pageviews'],
  777. "js": function () {
  778. "use strict";
  779. if (tarteaucitron.user.shareaholicSiteId === undefined) {
  780. return;
  781. }
  782. tarteaucitron.fallback(['shareaholic-canvas'], '');
  783. tarteaucitron.addScript('//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js', '', function () {
  784. try {
  785. Shareaholic.init(tarteaucitron.user.shareaholicSiteId);
  786. } catch (e) {}
  787. });
  788. },
  789. "fallback": function () {
  790. "use strict";
  791. var id = 'shareaholic';
  792. tarteaucitron.fallback(['shareaholic-canvas'], tarteaucitron.engage(id));
  793. }
  794. };
  795. // sharethis
  796. tarteaucitron.services.sharethis = {
  797. "key": "sharethis",
  798. "type": "social",
  799. "name": "ShareThis",
  800. "uri": "http://www.sharethis.com/legal/privacy/",
  801. "needConsent": true,
  802. "cookies": ['__unam'],
  803. "js": function () {
  804. "use strict";
  805. if (tarteaucitron.user.sharethisPublisher === undefined) {
  806. return;
  807. }
  808. var switchTo5x = true,
  809. uri = ('https:' === document.location.protocol ? 'https://ws' : 'http://w') + '.sharethis.com/button/buttons.js';
  810. tarteaucitron.fallback(['tacSharethis'], '');
  811. tarteaucitron.addScript(uri, '', function () {
  812. stLight.options({publisher: tarteaucitron.user.sharethisPublisher, doNotHash: false, doNotCopy: false, hashAddressBar: false});
  813. });
  814. if (tarteaucitron.isAjax === true) {
  815. if (typeof stButtons !== "undefined") {
  816. stButtons.locateElements();
  817. }
  818. }
  819. },
  820. "fallback": function () {
  821. "use strict";
  822. var id = 'sharethis';
  823. tarteaucitron.fallback(['tacSharethis'], tarteaucitron.engage(id));
  824. }
  825. };
  826. // slideshare
  827. tarteaucitron.services.slideshare = {
  828. "key": "slideshare",
  829. "type": "video",
  830. "name": "SlideShare",
  831. "uri": "https://www.linkedin.com/legal/privacy-policy",
  832. "needConsent": true,
  833. "cookies": [],
  834. "js": function () {
  835. "use strict";
  836. tarteaucitron.fallback(['slideshare-canvas'], function (x) {
  837. var id = x.getAttribute("data-id"),
  838. width = x.getAttribute("width"),
  839. height = x.getAttribute("height"),
  840. url = '//www.slideshare.net/slideshow/embed_code/' + id;
  841. return '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" allowtransparency allowfullscreen></iframe>';
  842. });
  843. },
  844. "fallback": function () {
  845. "use strict";
  846. var id = 'slideshare';
  847. tarteaucitron.fallback(['slideshare-canvas'], tarteaucitron.engage(id));
  848. }
  849. };
  850. // statcounter
  851. tarteaucitron.services.statcounter = {
  852. "key": "statcounter",
  853. "type": "analytic",
  854. "name": "StatCounter",
  855. "uri": "https://fr.statcounter.com/about/legal/#privacy",
  856. "needConsent": true,
  857. "cookies": ['sc_is_visitor_unique'],
  858. "js": function () {
  859. "use strict";
  860. var uniqIds = [],
  861. i,
  862. uri = '//statcounter.com/counter/counter.js';
  863. tarteaucitron.fallback(['statcounter-canvas'], function (x) {
  864. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  865. uniqIds.push(uniqId);
  866. return '<div id="' + uniqId + '"></div>';
  867. });
  868. for (i = 0; i < uniqIds.length; i += 1) {
  869. tarteaucitron.makeAsync.init(uri, uniqIds[i]);
  870. }
  871. },
  872. "fallback": function () {
  873. "use strict";
  874. var id = 'statcounter';
  875. tarteaucitron.fallback(['statcounter-canvas'], tarteaucitron.engage(id));
  876. }
  877. };
  878. // typekit
  879. tarteaucitron.services.typekit = {
  880. "key": "typekit",
  881. "type": "api",
  882. "name": "Typekit (adobe)",
  883. "uri": "http://www.adobe.com/fr/privacy.html",
  884. "needConsent": true,
  885. "cookies": [],
  886. "js": function () {
  887. "use strict";
  888. if (tarteaucitron.user.typekitId === undefined) {
  889. return;
  890. }
  891. tarteaucitron.addScript('//use.typekit.net/' + tarteaucitron.user.typekitId + '.js', '', function () {
  892. try {
  893. Typekit.load();
  894. } catch (e) {}
  895. });
  896. }
  897. };
  898. // twitter
  899. tarteaucitron.services.twitter = {
  900. "key": "twitter",
  901. "type": "social",
  902. "name": "Twitter",
  903. "uri": "https://support.twitter.com/articles/20170514",
  904. "needConsent": true,
  905. "cookies": [],
  906. "js": function () {
  907. "use strict";
  908. tarteaucitron.fallback(['tacTwitter'], '');
  909. tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
  910. },
  911. "fallback": function () {
  912. "use strict";
  913. var id = 'twitter';
  914. tarteaucitron.fallback(['tacTwitter'], tarteaucitron.engage(id));
  915. }
  916. };
  917. // twitter embed
  918. tarteaucitron.services.twitterembed = {
  919. "key": "twitterembed",
  920. "type": "social",
  921. "name": "Twitter (cards)",
  922. "uri": "https://support.twitter.com/articles/20170514",
  923. "needConsent": true,
  924. "cookies": [],
  925. "js": function () {
  926. "use strict";
  927. var uniqIds = [],
  928. i,
  929. e,
  930. html;
  931. tarteaucitron.fallback(['twitterembed-canvas'], function (x) {
  932. var uniqId = '_' + Math.random().toString(36).substr(2, 9);
  933. uniqIds.push(uniqId);
  934. html = '<div id="' + uniqId + '" ';
  935. html += 'tweetid="' + x.getAttribute('tweetid') + '" ';
  936. html += 'theme="' + x.getAttribute('theme') + '" ';
  937. html += 'cards="' + x.getAttribute('cards') + '" ';
  938. html += 'conversation="' + x.getAttribute('conversation') + '" ';
  939. html += 'data-width="' + x.getAttribute('data-width') + '" ';
  940. html += 'data-align="' + x.getAttribute('data-align') + '" ';
  941. html += '></div>';
  942. return html;
  943. });
  944. tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs', function () {
  945. for (i = 0; i < uniqIds.length; i += 1) {
  946. e = document.getElementById(uniqIds[i]);
  947. twttr.widgets.createTweet(
  948. e.getAttribute('tweetid'),
  949. e,
  950. {
  951. theme: e.getAttribute('theme'),
  952. cards: e.getAttribute('cards'),
  953. conversation: e.getAttribute('conversation'),
  954. lang: tarteaucitron.getLanguage(),
  955. dnt: true,
  956. width: e.getAttribute('data-width'),
  957. align: e.getAttribute('data-align')
  958. }
  959. );
  960. }
  961. });
  962. },
  963. "fallback": function () {
  964. "use strict";
  965. var id = 'twitterembed';
  966. tarteaucitron.fallback(['twitterembed-canvas'], tarteaucitron.engage(id));
  967. }
  968. };
  969. // twitter timeline
  970. tarteaucitron.services.twittertimeline = {
  971. "key": "twittertimeline",
  972. "type": "social",
  973. "name": "Twitter (timelines)",
  974. "uri": "https://support.twitter.com/articles/20170514",
  975. "needConsent": true,
  976. "cookies": [],
  977. "js": function () {
  978. "use strict";
  979. tarteaucitron.fallback(['tacTwitterTimelines'], '');
  980. tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
  981. },
  982. "fallback": function () {
  983. "use strict";
  984. var id = 'twittertimeline';
  985. tarteaucitron.fallback(['tacTwitterTimelines'], tarteaucitron.engage(id));
  986. }
  987. };
  988. // user voice
  989. tarteaucitron.services.uservoice = {
  990. "key": "uservoice",
  991. "type": "support",
  992. "name": "UserVoice",
  993. "uri": "https://www.uservoice.com/privacy/",
  994. "needConsent": true,
  995. "cookies": [],
  996. "js": function () {
  997. "use strict";
  998. if (tarteaucitron.user.userVoiceApi === undefined) {
  999. return;
  1000. }
  1001. tarteaucitron.addScript('//widget.uservoice.com/' + tarteaucitron.user.userVoiceApi + '.js');
  1002. }
  1003. };
  1004. // vimeo
  1005. tarteaucitron.services.vimeo = {
  1006. "key": "vimeo",
  1007. "type": "video",
  1008. "name": "Vimeo",
  1009. "uri": "http://vimeo.com/privacy",
  1010. "needConsent": true,
  1011. "cookies": ['__utmt_player', '__utma', '__utmb', '__utmc', '__utmv', 'vuid', '__utmz', 'player'],
  1012. "js": function () {
  1013. "use strict";
  1014. tarteaucitron.fallback(['vimeo_player'], function (x) {
  1015. var video_id = x.getAttribute("videoID"),
  1016. video_width = x.getAttribute("width"),
  1017. frame_width = 'width=',
  1018. video_height = x.getAttribute("height"),
  1019. frame_height = 'height=',
  1020. video_frame;
  1021. if (video_id === undefined) {
  1022. return "";
  1023. }
  1024. if (video_width !== undefined) {
  1025. frame_width += '"' + video_width + '" ';
  1026. } else {
  1027. frame_width += '"" ';
  1028. }
  1029. if (video_height !== undefined) {
  1030. frame_height += '"' + video_height + '" ';
  1031. } else {
  1032. frame_height += '"" ';
  1033. }
  1034. video_frame = '<iframe src="//player.vimeo.com/video/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
  1035. return video_frame;
  1036. });
  1037. },
  1038. "fallback": function () {
  1039. "use strict";
  1040. var id = 'vimeo';
  1041. tarteaucitron.fallback(['vimeo_player'], tarteaucitron.engage(id));
  1042. }
  1043. };
  1044. // visualrevenue
  1045. tarteaucitron.services.visualrevenue = {
  1046. "key": "visualrevenue",
  1047. "type": "analytic",
  1048. "name": "VisualRevenue",
  1049. "uri": "http://www.outbrain.com/legal/privacy-713/",
  1050. "needConsent": true,
  1051. "cookies": ['__vrf', '__vrm', '__vrl', '__vry', '__vru', '__vrid', '__vrz'],
  1052. "js": function () {
  1053. "use strict";
  1054. if (tarteaucitron.user.visualrevenueId === undefined) {
  1055. return;
  1056. }
  1057. window._vrq = window._vrq || [];
  1058. window._vrq.push(['id', tarteaucitron.user.visualrevenueId]);
  1059. window._vrq.push(['automate', true]);
  1060. window._vrq.push(['track', function () {}]);
  1061. tarteaucitron.addScript('http://a.visualrevenue.com/vrs.js');
  1062. }
  1063. };
  1064. // vshop
  1065. tarteaucitron.services.vshop = {
  1066. "key": "vshop",
  1067. "type": "ads",
  1068. "name": "vShop",
  1069. "uri": "http://vshop.fr/privacy-policy",
  1070. "needConsent": true,
  1071. "cookies": [],
  1072. "js": function () {
  1073. "use strict";
  1074. tarteaucitron.fallback(['vcashW'], '');
  1075. tarteaucitron.addScript('//vshop.fr/js/w.js');
  1076. },
  1077. "fallback": function () {
  1078. "use strict";
  1079. var id = 'vshop';
  1080. tarteaucitron.fallback(['vcashW'], tarteaucitron.engage(id));
  1081. }
  1082. };
  1083. // xiti
  1084. tarteaucitron.services.xiti = {
  1085. "key": "xiti",
  1086. "type": "analytic",
  1087. "name": "Xiti",
  1088. "uri": "http://www.atinternet.com/politique-du-respect-de-la-vie-privee/",
  1089. "needConsent": true,
  1090. "cookies": [],
  1091. "js": function () {
  1092. "use strict";
  1093. if (tarteaucitron.user.xitiId === undefined) {
  1094. return;
  1095. }
  1096. var Xt_param = 's=' + tarteaucitron.user.xitiId + '&p=',
  1097. Xt_r,
  1098. Xt_h,
  1099. Xt_i,
  1100. Xt_s,
  1101. div = document.createElement('div');
  1102. try {
  1103. Xt_r = top.document.referrer;
  1104. } catch (e) {
  1105. Xt_r = document.referrer;
  1106. }
  1107. Xt_h = new Date();
  1108. Xt_i = '<img style="display:none" border="0" alt="" ';
  1109. Xt_i += 'src="http://logv3.xiti.com/hit.xiti?' + Xt_param;
  1110. Xt_i += '&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
  1111. if (parseFloat(navigator.appVersion) >= 4) {
  1112. Xt_s = screen;
  1113. Xt_i += '&r=' + Xt_s.width + 'x' + Xt_s.height + 'x' + Xt_s.pixelDepth + 'x' + Xt_s.colorDepth;
  1114. }
  1115. div.innerHTML = Xt_i + '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$') + '" title="Internet Audience">';
  1116. document.getElementsByTagName('body')[0].appendChild(div.firstChild);
  1117. if (typeof tarteaucitron.user.xitiMore === 'function') {
  1118. tarteaucitron.user.xitiMore();
  1119. }
  1120. }
  1121. };
  1122. // youtube
  1123. tarteaucitron.services.youtube = {
  1124. "key": "youtube",
  1125. "type": "video",
  1126. "name": "YouTube",
  1127. "uri": "https://www.google.fr/intl/fr/policies/privacy/",
  1128. "needConsent": true,
  1129. "cookies": ['VISITOR_INFO1_LIVE', 'YSC', 'PREF', 'GEUP'],
  1130. "js": function () {
  1131. "use strict";
  1132. tarteaucitron.fallback(['youtube_player'], function (x) {
  1133. var video_id = x.getAttribute("videoID"),
  1134. video_width = x.getAttribute("width"),
  1135. frame_width = 'width=',
  1136. video_height = x.getAttribute("height"),
  1137. frame_height = 'height=',
  1138. video_frame,
  1139. params = 'theme=' + x.getAttribute("theme") + '&rel=' + x.getAttribute("rel") + '&controls=' + x.getAttribute("controls") + '&showinfo=' + x.getAttribute("showinfo") + '&autoplay=' + x.getAttribute("autoplay");
  1140. if (video_id === undefined) {
  1141. return "";
  1142. }
  1143. if (video_width !== undefined) {
  1144. frame_width += '"' + video_width + '" ';
  1145. } else {
  1146. frame_width += '"" ';
  1147. }
  1148. if (video_height !== undefined) {
  1149. frame_height += '"' + video_height + '" ';
  1150. } else {
  1151. frame_height += '"" ';
  1152. }
  1153. video_frame = '<iframe type="text/html" ' + frame_width + frame_height + ' src="//www.youtube-nocookie.com/embed/' + video_id + '?' + params + '" frameborder="0"></iframe>';
  1154. return video_frame;
  1155. });
  1156. },
  1157. "fallback": function () {
  1158. "use strict";
  1159. var id = 'youtube';
  1160. tarteaucitron.fallback(['youtube_player'], tarteaucitron.engage(id));
  1161. }
  1162. };
  1163. // zopim
  1164. tarteaucitron.services.zopim = {
  1165. "key": "zopim",
  1166. "type": "support",
  1167. "name": "Zopim",
  1168. "uri": "https://www.zopim.com/privacy",
  1169. "needConsent": true,
  1170. "cookies": ['__zlcid', '__zprivacy'],
  1171. "js": function () {
  1172. "use strict";
  1173. if (tarteaucitron.user.zopimID === undefined) {
  1174. return;
  1175. }
  1176. tarteaucitron.addScript('//v2.zopim.com/?' + tarteaucitron.user.zopimID);
  1177. }
  1178. };