tarteaucitron.services.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  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. // clicky
  89. tarteaucitron.services.clicky = {
  90. "key": "clicky",
  91. "type": "analytic",
  92. "name": "Clicky",
  93. "uri": "https://clicky.com/terms",
  94. "needConsent": true,
  95. "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],
  96. "js": function () {
  97. "use strict";
  98. if (tarteaucitron.user.clickyId === undefined) {
  99. return;
  100. }
  101. tarteaucitron.addScript('//static.getclicky.com/js', '', function () {
  102. if (typeof clicky.init === 'function') {
  103. clicky.init(tarteaucitron.user.clickyId);
  104. }
  105. if (typeof tarteaucitron.user.clickyMore === 'function') {
  106. tarteaucitron.user.clickyMore();
  107. }
  108. });
  109. }
  110. };
  111. // dailymotion
  112. tarteaucitron.services.dailymotion = {
  113. "key": "dailymotion",
  114. "type": "video",
  115. "name": "Dailymotion",
  116. "uri": "http://www.dailymotion.com/legal/privacy",
  117. "needConsent": true,
  118. "cookies": ['ts', 'dmvk', 'hist', 'v1st', 's_vi'],
  119. "js": function () {
  120. "use strict";
  121. tarteaucitron.fallback(['dailymotion_player'], function (x) {
  122. var video_id = x.getAttribute("videoID"),
  123. video_width = x.getAttribute("width"),
  124. frame_width = 'width=',
  125. video_height = x.getAttribute("height"),
  126. frame_height = 'height=',
  127. video_frame;
  128. if (video_id === undefined) {
  129. return "";
  130. }
  131. if (video_width !== undefined) {
  132. frame_width += '"' + video_width + '" ';
  133. } else {
  134. frame_width += '"" ';
  135. }
  136. if (video_height !== undefined) {
  137. frame_height += '"' + video_height + '" ';
  138. } else {
  139. frame_height += '"" ';
  140. }
  141. video_frame = '<iframe src="//www.dailymotion.com/embed/video/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" allowfullscreen></iframe>';
  142. return video_frame;
  143. });
  144. },
  145. "fallback": function () {
  146. "use strict";
  147. var id = 'dailymotion';
  148. tarteaucitron.fallback(['dailymotion_player'], tarteaucitron.engage(id));
  149. }
  150. };
  151. // disqus
  152. tarteaucitron.services.disqus = {
  153. "key": "disqus",
  154. "type": "comment",
  155. "name": "Disqus",
  156. "uri": "https://help.disqus.com/customer/portal/articles/466259-privacy-policy",
  157. "needConsent": true,
  158. "cookies": [],
  159. "js": function () {
  160. "use strict";
  161. if (tarteaucitron.user.disqusShortname === undefined) {
  162. return;
  163. }
  164. tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/embed.js');
  165. tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/count.js');
  166. },
  167. "fallback": function () {
  168. "use strict";
  169. var id = 'disqus';
  170. if (document.getElementById('disqus_thread')) {
  171. document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id);
  172. }
  173. }
  174. };
  175. // facebook
  176. tarteaucitron.services.facebook = {
  177. "key": "facebook",
  178. "type": "social",
  179. "name": "Facebook",
  180. "uri": "https://www.facebook.com/help/cookies/",
  181. "needConsent": true,
  182. "cookies": [],
  183. "js": function () {
  184. "use strict";
  185. tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], '');
  186. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  187. },
  188. "fallback": function () {
  189. "use strict";
  190. var id = 'facebook';
  191. tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], tarteaucitron.engage(id));
  192. }
  193. };
  194. // facebooklikebox
  195. tarteaucitron.services.facebooklikebox = {
  196. "key": "facebooklikebox",
  197. "type": "social",
  198. "name": "Facebook (like box)",
  199. "uri": "https://www.facebook.com/help/cookies/",
  200. "needConsent": true,
  201. "cookies": [],
  202. "js": function () {
  203. "use strict";
  204. tarteaucitron.fallback(['fb-like-box'], '');
  205. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  206. },
  207. "fallback": function () {
  208. "use strict";
  209. var id = 'facebooklikebox';
  210. tarteaucitron.fallback(['fb-like-box'], tarteaucitron.engage(id));
  211. }
  212. };
  213. // facebookcomment
  214. tarteaucitron.services.facebookcomment = {
  215. "key": "facebookcomment",
  216. "type": "comment",
  217. "name": "Facebook (commentaire)",
  218. "uri": "https://www.facebook.com/help/cookies/",
  219. "needConsent": true,
  220. "cookies": [],
  221. "js": function () {
  222. "use strict";
  223. tarteaucitron.fallback(['fb-comments'], '');
  224. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  225. },
  226. "fallback": function () {
  227. "use strict";
  228. var id = 'facebookcomment';
  229. tarteaucitron.fallback(['fb-comments'], tarteaucitron.engage(id));
  230. }
  231. };
  232. // ferank
  233. tarteaucitron.services.ferank = {
  234. "key": "ferank",
  235. "type": "analytic",
  236. "name": "FERank",
  237. "uri": "https://www.ferank.fr/respect-vie-privee/#mesureaudience",
  238. "needConsent": false,
  239. "cookies": [],
  240. "js": function () {
  241. "use strict";
  242. tarteaucitron.addScript('//static.ferank.fr/pixel.js', '', function () {
  243. if (typeof tarteaucitron.user.ferankMore === 'function') {
  244. tarteaucitron.user.ferankMore();
  245. }
  246. });
  247. }
  248. };
  249. // ferank pub
  250. tarteaucitron.services.ferankpub = {
  251. "key": "ferankpub",
  252. "type": "ads",
  253. "name": "FERank (pub)",
  254. "uri": "https://www.ferank.fr/respect-vie-privee/#regiepublicitaire",
  255. "needConsent": false,
  256. "cookies": [],
  257. "js": function () {
  258. "use strict";
  259. tarteaucitron.addScript('//static.ferank.fr/publicite.async.js');
  260. },
  261. "fallback": function () {
  262. "use strict";
  263. var id = 'ferankpub';
  264. tarteaucitron.fallback(['ferank-publicite'], tarteaucitron.engage(id));
  265. }
  266. };
  267. // google+
  268. tarteaucitron.services.gplus = {
  269. "key": "gplus",
  270. "type": "social",
  271. "name": "Google+",
  272. "uri": "http://www.google.fr/intl/policies/privacy/",
  273. "needConsent": true,
  274. "cookies": [],
  275. "js": function () {
  276. "use strict";
  277. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  278. },
  279. "fallback": function () {
  280. "use strict";
  281. var id = 'gplus';
  282. tarteaucitron.fallback(['g-plus', 'g-plusone'], tarteaucitron.engage(id));
  283. }
  284. };
  285. // google+ badge
  286. tarteaucitron.services.gplusbadge = {
  287. "key": "gplusbadge",
  288. "type": "social",
  289. "name": "Google+ (badge)",
  290. "uri": "http://www.google.fr/intl/policies/privacy/",
  291. "needConsent": true,
  292. "cookies": [],
  293. "js": function () {
  294. "use strict";
  295. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  296. },
  297. "fallback": function () {
  298. "use strict";
  299. var id = 'gplusbadge';
  300. tarteaucitron.fallback(['g-page', 'g-person'], tarteaucitron.engage(id));
  301. }
  302. };
  303. // google adsense
  304. tarteaucitron.services.adsense = {
  305. "key": "adsense",
  306. "type": "ads",
  307. "name": "Adsense (Google)",
  308. "uri": "http://www.google.com/ads/preferences/",
  309. "needConsent": true,
  310. "cookies": [],
  311. "js": function () {
  312. "use strict";
  313. tarteaucitron.addScript('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
  314. },
  315. "fallback": function () {
  316. "use strict";
  317. var id = 'adsense';
  318. tarteaucitron.fallback(['adsbygoogle'], tarteaucitron.engage(id));
  319. }
  320. };
  321. // googleadwordsconversion
  322. tarteaucitron.services.googleadwordsconversion = {
  323. "key": "googleadwordsconversion",
  324. "type": "ads",
  325. "name": "Google Adwords (conversion)",
  326. "uri": "https://www.google.com/settings/ads",
  327. "needConsent": true,
  328. "cookies": [],
  329. "js": function () {
  330. "use strict";
  331. if (tarteaucitron.user.adwordsconversionId === undefined) {
  332. return;
  333. }
  334. tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
  335. window.google_trackConversion({
  336. google_conversion_id: tarteaucitron.user.adwordsconversionId,
  337. google_conversion_label: tarteaucitron.user.adwordsconversionLabel,
  338. google_custom_params: {
  339. parameter1: tarteaucitron.user.adwordsconversionCustom1,
  340. parameter2: tarteaucitron.user.adwordsconversionCustom2
  341. }
  342. });
  343. });
  344. }
  345. };
  346. // googleadwordsremarketing
  347. tarteaucitron.services.googleadwordsremarketing = {
  348. "key": "googleadwordsremarketing",
  349. "type": "ads",
  350. "name": "Google Adwords (remarketing)",
  351. "uri": "https://www.google.com/settings/ads",
  352. "needConsent": true,
  353. "cookies": [],
  354. "js": function () {
  355. "use strict";
  356. if (tarteaucitron.user.adwordsremarketingId === undefined) {
  357. return;
  358. }
  359. tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
  360. window.google_trackConversion({
  361. google_conversion_id: tarteaucitron.user.adwordsremarketingId,
  362. google_remarketing_only: true
  363. });
  364. });
  365. }
  366. };
  367. // google analytics (old)
  368. tarteaucitron.services.gajs = {
  369. "key": "gajs",
  370. "type": "analytic",
  371. "name": "Google Analytics (ga.js)",
  372. "uri": "https://support.google.com/analytics/answer/6004245",
  373. "needConsent": true,
  374. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  375. "js": function () {
  376. "use strict";
  377. window._gaq = window._gaq || [];
  378. window._gaq.push(['_setAccount', tarteaucitron.user.gajsUa]);
  379. window._gaq.push(['_trackPageview']);
  380. tarteaucitron.addScript('//www.google-analytics.com/ga.js', '', function () {
  381. if (typeof tarteaucitron.user.gajsMore === 'function') {
  382. tarteaucitron.user.gajsMore();
  383. }
  384. });
  385. }
  386. };
  387. // google analytics
  388. tarteaucitron.services.analytics = {
  389. "key": "analytics",
  390. "type": "analytic",
  391. "name": "Google Analytics (universal)",
  392. "uri": "https://support.google.com/analytics/answer/6004245",
  393. "needConsent": true,
  394. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  395. "js": function () {
  396. "use strict";
  397. window.GoogleAnalyticsObject = 'ga';
  398. window.ga = window.ga || function () {
  399. window.ga.q = window.ga.q || [];
  400. window.ga.q.push(arguments);
  401. };
  402. window.ga.l = new Date();
  403. tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
  404. ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
  405. ga('send', 'pageview');
  406. if (typeof tarteaucitron.user.analyticsMore === 'function') {
  407. tarteaucitron.user.analyticsMore();
  408. }
  409. });
  410. }
  411. };
  412. // google maps
  413. tarteaucitron.services.googlemaps = {
  414. "key": "googlemaps",
  415. "type": "api",
  416. "name": "Google Maps",
  417. "uri": "http://www.google.com/ads/preferences/",
  418. "needConsent": true,
  419. "cookies": [],
  420. "js": function () {
  421. "use strict";
  422. if (tarteaucitron.user.googlemapsApiKey === undefined) {
  423. return;
  424. }
  425. tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=tarteaucitron_googlemaps&key=' + tarteaucitron.user.googlemapsApiKey);
  426. },
  427. "fallback": function () {
  428. "use strict";
  429. var id = 'googlemaps';
  430. if (document.getElementById('tac_map-canvas')) {
  431. document.getElementById('tac_map-canvas').innerHTML = tarteaucitron.engage(id);
  432. }
  433. }
  434. };
  435. // google tag manager
  436. tarteaucitron.services.googletagmanager = {
  437. "key": "googletagmanager",
  438. "type": "api",
  439. "name": "Google Tag Manager",
  440. "uri": "http://www.google.com/ads/preferences/",
  441. "needConsent": true,
  442. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  443. "js": function () {
  444. "use strict";
  445. if (tarteaucitron.user.googletagmanagerId === undefined) {
  446. return;
  447. }
  448. window.dataLayer = window.dataLayer || [];
  449. window.dataLayer.push({
  450. 'gtm.start': new Date().getTime(),
  451. event: 'gtm.js'
  452. });
  453. tarteaucitron.addScript('//www.googletagmanager.com/gtm.js?id=' + tarteaucitron.user.googletagmanagerId);
  454. }
  455. };
  456. // jsapi
  457. tarteaucitron.services.jsapi = {
  458. "key": "jsapi",
  459. "type": "api",
  460. "name": "Google jsapi",
  461. "uri": "http://www.google.com/policies/privacy/",
  462. "needConsent": true,
  463. "cookies": [],
  464. "js": function () {
  465. "use strict";
  466. tarteaucitron.addScript('//www.google.com/jsapi');
  467. }
  468. };
  469. // linkedin
  470. tarteaucitron.services.linkedin = {
  471. "key": "linkedin",
  472. "type": "social",
  473. "name": "Linkedin",
  474. "uri": "https://www.linkedin.com/legal/cookie_policy",
  475. "needConsent": true,
  476. "cookies": [],
  477. "js": function () {
  478. "use strict";
  479. tarteaucitron.fallback(['tacLinkedin'], '');
  480. tarteaucitron.addScript('//platform.linkedin.com/in.js');
  481. },
  482. "fallback": function () {
  483. "use strict";
  484. var id = 'linkedin';
  485. tarteaucitron.fallback(['tacLinkedin'], tarteaucitron.engage(id));
  486. }
  487. };
  488. // pinterest
  489. tarteaucitron.services.pinterest = {
  490. "key": "pinterest",
  491. "type": "social",
  492. "name": "Pinterest",
  493. "uri": "https://about.pinterest.com/privacy-policy",
  494. "needConsent": true,
  495. "cookies": [],
  496. "js": function () {
  497. "use strict";
  498. tarteaucitron.addScript('//assets.pinterest.com/js/pinit.js');
  499. }
  500. };
  501. // shareaholic
  502. tarteaucitron.services.shareaholic = {
  503. "key": "shareaholic",
  504. "type": "social",
  505. "name": "Shareaholic",
  506. "uri": "https://shareaholic.com/privacy/choices",
  507. "needConsent": true,
  508. "cookies": ['__utma', '__utmb', '__utmc', '__utmz', '__utmt_Shareaholic%20Pageviews'],
  509. "js": function () {
  510. "use strict";
  511. if (tarteaucitron.user.shareaholicSiteId === undefined) {
  512. return;
  513. }
  514. tarteaucitron.fallback(['shareaholic-canvas'], '');
  515. tarteaucitron.addScript('//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js', '', function () {
  516. try {
  517. Shareaholic.init(tarteaucitron.user.shareaholicSiteId);
  518. } catch (e) {}
  519. });
  520. },
  521. "fallback": function () {
  522. "use strict";
  523. var id = 'shareaholic';
  524. tarteaucitron.fallback(['shareaholic-canvas'], tarteaucitron.engage(id));
  525. }
  526. };
  527. // sharethis
  528. tarteaucitron.services.sharethis = {
  529. "key": "sharethis",
  530. "type": "social",
  531. "name": "ShareThis",
  532. "uri": "http://www.sharethis.com/legal/privacy/",
  533. "needConsent": true,
  534. "cookies": ['__unam'],
  535. "js": function () {
  536. "use strict";
  537. if (tarteaucitron.user.sharethisPublisher === undefined) {
  538. return;
  539. }
  540. var switchTo5x = true,
  541. uri = ('https:' === document.location.protocol ? 'https://ws' : 'http://w') + '.sharethis.com/button/buttons.js';
  542. tarteaucitron.fallback(['tacSharethis'], '');
  543. tarteaucitron.addScript(uri, '', function () {
  544. stLight.options({publisher: tarteaucitron.user.sharethisPublisher, doNotHash: false, doNotCopy: false, hashAddressBar: false});
  545. });
  546. },
  547. "fallback": function () {
  548. "use strict";
  549. var id = 'sharethis';
  550. tarteaucitron.fallback(['tacSharethis'], tarteaucitron.engage(id));
  551. }
  552. };
  553. // typekit
  554. tarteaucitron.services.typekit = {
  555. "key": "typekit",
  556. "type": "api",
  557. "name": "Typekit (adobe)",
  558. "uri": "http://www.adobe.com/fr/privacy.html",
  559. "needConsent": true,
  560. "cookies": [],
  561. "js": function () {
  562. "use strict";
  563. if (tarteaucitron.user.typekitId === undefined) {
  564. return;
  565. }
  566. tarteaucitron.addScript('//use.typekit.net/' + tarteaucitron.user.typekitId + '.js', '', function () {
  567. try {
  568. Typekit.load();
  569. } catch (e) {}
  570. });
  571. }
  572. };
  573. // twitter
  574. tarteaucitron.services.twitter = {
  575. "key": "twitter",
  576. "type": "social",
  577. "name": "Twitter",
  578. "uri": "https://support.twitter.com/articles/20170514",
  579. "needConsent": true,
  580. "cookies": [],
  581. "js": function () {
  582. "use strict";
  583. tarteaucitron.fallback(['tacTwitter'], '');
  584. tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
  585. },
  586. "fallback": function () {
  587. "use strict";
  588. var id = 'twitter';
  589. tarteaucitron.fallback(['tacTwitter'], tarteaucitron.engage(id));
  590. }
  591. };
  592. // user voice
  593. tarteaucitron.services.uservoice = {
  594. "key": "uservoice",
  595. "type": "support",
  596. "name": "UserVoice",
  597. "uri": "https://www.uservoice.com/privacy/",
  598. "needConsent": true,
  599. "cookies": [],
  600. "js": function () {
  601. "use strict";
  602. if (tarteaucitron.user.userVoiceApi === undefined) {
  603. return;
  604. }
  605. tarteaucitron.addScript('//widget.uservoice.com/' + tarteaucitron.user.userVoiceApi + '.js');
  606. }
  607. };
  608. // vimeo
  609. tarteaucitron.services.vimeo = {
  610. "key": "vimeo",
  611. "type": "video",
  612. "name": "Vimeo",
  613. "uri": "http://vimeo.com/privacy",
  614. "needConsent": true,
  615. "cookies": ['__utmt_player', '__utma', '__utmb', '__utmc', '__utmv', 'vuid', '__utmz', 'player'],
  616. "js": function () {
  617. "use strict";
  618. tarteaucitron.fallback(['vimeo_player'], function (x) {
  619. var video_id = x.getAttribute("videoID"),
  620. video_width = x.getAttribute("width"),
  621. frame_width = 'width=',
  622. video_height = x.getAttribute("height"),
  623. frame_height = 'height=',
  624. video_frame;
  625. if (video_id === undefined) {
  626. return "";
  627. }
  628. if (video_width !== undefined) {
  629. frame_width += '"' + video_width + '" ';
  630. } else {
  631. frame_width += '"" ';
  632. }
  633. if (video_height !== undefined) {
  634. frame_height += '"' + video_height + '" ';
  635. } else {
  636. frame_height += '"" ';
  637. }
  638. video_frame = '<iframe src="//player.vimeo.com/video/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
  639. return video_frame;
  640. });
  641. },
  642. "fallback": function () {
  643. "use strict";
  644. var id = 'vimeo';
  645. tarteaucitron.fallback(['vimeo_player'], tarteaucitron.engage(id));
  646. }
  647. };
  648. // visualrevenue
  649. tarteaucitron.services.visualrevenue = {
  650. "key": "visualrevenue",
  651. "type": "analytic",
  652. "name": "VisualRevenue",
  653. "uri": "http://www.outbrain.com/legal/privacy-713/",
  654. "needConsent": true,
  655. "cookies": ['__vrf', '__vrm', '__vrl', '__vry', '__vru', '__vrid', '__vrz'],
  656. "js": function () {
  657. "use strict";
  658. if (tarteaucitron.user.visualrevenueId === undefined) {
  659. return;
  660. }
  661. window._vrq = window._vrq || [];
  662. window._vrq.push(['id', tarteaucitron.user.visualrevenueId]);
  663. window._vrq.push(['automate', true]);
  664. window._vrq.push(['track', function () {}]);
  665. tarteaucitron.addScript('http://a.visualrevenue.com/vrs.js');
  666. }
  667. };
  668. // xiti
  669. tarteaucitron.services.xiti = {
  670. "key": "xiti",
  671. "type": "analytic",
  672. "name": "Xiti",
  673. "uri": "http://www.atinternet.com/politique-du-respect-de-la-vie-privee/",
  674. "needConsent": true,
  675. "cookies": [],
  676. "js": function () {
  677. "use strict";
  678. if (tarteaucitron.user.xitiId === undefined) {
  679. return;
  680. }
  681. var Xt_param = 's=' + tarteaucitron.user.xitiId + '&p=',
  682. Xt_r,
  683. Xt_h,
  684. Xt_i,
  685. Xt_s,
  686. div = document.createElement('div');
  687. try {
  688. Xt_r = top.document.referrer;
  689. } catch (e) {
  690. Xt_r = document.referrer;
  691. }
  692. Xt_h = new Date();
  693. Xt_i = '<img style="display:none" border="0" alt="" ';
  694. Xt_i += 'src="http://logv3.xiti.com/hit.xiti?' + Xt_param;
  695. Xt_i += '&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
  696. if (parseFloat(navigator.appVersion) >= 4) {
  697. Xt_s = screen;
  698. Xt_i += '&r=' + Xt_s.width + 'x' + Xt_s.height + 'x' + Xt_s.pixelDepth + 'x' + Xt_s.colorDepth;
  699. }
  700. div.innerHTML = Xt_i + '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$') + '" title="Internet Audience">';
  701. document.getElementsByTagName('body')[0].appendChild(div.firstChild);
  702. if (typeof tarteaucitron.user.xitiMore === 'function') {
  703. tarteaucitron.user.xitiMore();
  704. }
  705. }
  706. };
  707. // youtube
  708. tarteaucitron.services.youtube = {
  709. "key": "youtube",
  710. "type": "video",
  711. "name": "YouTube",
  712. "uri": "https://www.google.fr/intl/fr/policies/privacy/",
  713. "needConsent": true,
  714. "cookies": ['VISITOR_INFO1_LIVE', 'YSC', 'PREF', 'GEUP'],
  715. "js": function () {
  716. "use strict";
  717. tarteaucitron.fallback(['youtube_player'], function (x) {
  718. var video_id = x.getAttribute("videoID"),
  719. video_width = x.getAttribute("width"),
  720. frame_width = 'width=',
  721. video_height = x.getAttribute("height"),
  722. frame_height = 'height=',
  723. video_frame;
  724. if (video_id === undefined) {
  725. return "";
  726. }
  727. if (video_width !== undefined) {
  728. frame_width += '"' + video_width + '" ';
  729. } else {
  730. frame_width += '"" ';
  731. }
  732. if (video_height !== undefined) {
  733. frame_height += '"' + video_height + '" ';
  734. } else {
  735. frame_height += '"" ';
  736. }
  737. video_frame = '<iframe type="text/html" ' + frame_width + frame_height + ' src="//www.youtube.com/embed/' + video_id + ' " frameborder="0"></iframe>';
  738. return video_frame;
  739. });
  740. },
  741. "fallback": function () {
  742. "use strict";
  743. var id = 'youtube';
  744. tarteaucitron.fallback(['youtube_player'], tarteaucitron.engage(id));
  745. }
  746. };
  747. // zopim
  748. tarteaucitron.services.zopim = {
  749. "key": "zopim",
  750. "type": "support",
  751. "name": "Zopim",
  752. "uri": "https://www.zopim.com/privacy",
  753. "needConsent": true,
  754. "cookies": ['__zlcid', '__zprivacy'],
  755. "js": function () {
  756. "use strict";
  757. if (tarteaucitron.user.zopimID === undefined) {
  758. return;
  759. }
  760. tarteaucitron.addScript('//v2.zopim.com/?' + tarteaucitron.user.zopimID);
  761. }
  762. };