tarteaucitron.services.js 33 KB

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