tarteaucitron.services.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  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-like-box', '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-like-box', 'fb-send', 'fb-share-button', 'fb-like'], tarteaucitron.engage(id));
  192. }
  193. };
  194. // facebookcomment
  195. tarteaucitron.services.facebookcomment = {
  196. "key": "facebookcomment",
  197. "type": "comment",
  198. "name": "Facebook (commentaire)",
  199. "uri": "https://www.facebook.com/help/cookies/",
  200. "needConsent": true,
  201. "cookies": [],
  202. "js": function () {
  203. "use strict";
  204. tarteaucitron.fallback(['fb-comments'], '');
  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 = 'facebookcomment';
  210. tarteaucitron.fallback(['fb-comments'], tarteaucitron.engage(id));
  211. }
  212. };
  213. // ferank
  214. tarteaucitron.services.ferank = {
  215. "key": "ferank",
  216. "type": "analytic",
  217. "name": "FERank",
  218. "uri": "https://www.ferank.fr/respect-vie-privee/#mesureaudience",
  219. "needConsent": false,
  220. "cookies": [],
  221. "js": function () {
  222. "use strict";
  223. tarteaucitron.addScript('//static.ferank.fr/pixel.js', '', function () {
  224. if (typeof tarteaucitron.user.ferankMore === 'function') {
  225. tarteaucitron.user.ferankMore();
  226. }
  227. });
  228. }
  229. };
  230. // ferank pub
  231. tarteaucitron.services.ferankpub = {
  232. "key": "ferankpub",
  233. "type": "ads",
  234. "name": "FERank (pub)",
  235. "uri": "https://www.ferank.fr/respect-vie-privee/#regiepublicitaire",
  236. "needConsent": false,
  237. "cookies": [],
  238. "js": function () {
  239. "use strict";
  240. tarteaucitron.addScript('//static.ferank.fr/publicite.async.js');
  241. },
  242. "fallback": function () {
  243. "use strict";
  244. var id = 'ferankpub';
  245. tarteaucitron.fallback(['ferank-publicite'], tarteaucitron.engage(id));
  246. }
  247. };
  248. // google+
  249. tarteaucitron.services.gplus = {
  250. "key": "gplus",
  251. "type": "social",
  252. "name": "Google+",
  253. "uri": "http://www.google.fr/intl/policies/privacy/",
  254. "needConsent": true,
  255. "cookies": [],
  256. "js": function () {
  257. "use strict";
  258. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  259. },
  260. "fallback": function () {
  261. "use strict";
  262. var id = 'gplus';
  263. tarteaucitron.fallback(['g-plus', 'g-plusone'], tarteaucitron.engage(id));
  264. }
  265. };
  266. // google+ badge
  267. tarteaucitron.services.gplusbadge = {
  268. "key": "gplusbadge",
  269. "type": "social",
  270. "name": "Google+ (badge)",
  271. "uri": "http://www.google.fr/intl/policies/privacy/",
  272. "needConsent": true,
  273. "cookies": [],
  274. "js": function () {
  275. "use strict";
  276. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  277. },
  278. "fallback": function () {
  279. "use strict";
  280. var id = 'gplusbadge';
  281. tarteaucitron.fallback(['g-page', 'g-person'], tarteaucitron.engage(id));
  282. }
  283. };
  284. // google adsense
  285. tarteaucitron.services.adsense = {
  286. "key": "adsense",
  287. "type": "ads",
  288. "name": "Adsense (Google)",
  289. "uri": "http://www.google.com/ads/preferences/",
  290. "needConsent": true,
  291. "cookies": [],
  292. "js": function () {
  293. "use strict";
  294. tarteaucitron.addScript('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
  295. },
  296. "fallback": function () {
  297. "use strict";
  298. var id = 'adsense';
  299. tarteaucitron.fallback(['adsbygoogle'], tarteaucitron.engage(id));
  300. }
  301. };
  302. // google analytics (old)
  303. tarteaucitron.services.gajs = {
  304. "key": "gajs",
  305. "type": "analytic",
  306. "name": "Google Analytics (ga.js)",
  307. "uri": "https://support.google.com/analytics/answer/6004245",
  308. "needConsent": true,
  309. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  310. "js": function () {
  311. "use strict";
  312. window._gaq = window._gaq || [];
  313. window._gaq.push(['_setAccount', tarteaucitron.user.gajsUa]);
  314. window._gaq.push(['_trackPageview']);
  315. tarteaucitron.addScript('//www.google-analytics.com/ga.js', '', function () {
  316. if (typeof tarteaucitron.user.gajsMore === 'function') {
  317. tarteaucitron.user.gajsMore();
  318. }
  319. });
  320. }
  321. };
  322. // google analytics
  323. tarteaucitron.services.analytics = {
  324. "key": "analytics",
  325. "type": "analytic",
  326. "name": "Google Analytics (universal)",
  327. "uri": "https://support.google.com/analytics/answer/6004245",
  328. "needConsent": true,
  329. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  330. "js": function () {
  331. "use strict";
  332. window.GoogleAnalyticsObject = 'ga';
  333. window.ga = window.ga || function () {
  334. window.ga.q = window.ga.q || [];
  335. window.ga.q.push(arguments);
  336. };
  337. window.ga.l = new Date();
  338. tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
  339. ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
  340. ga('send', 'pageview');
  341. if (typeof tarteaucitron.user.analyticsMore === 'function') {
  342. tarteaucitron.user.analyticsMore();
  343. }
  344. });
  345. }
  346. };
  347. // google maps
  348. tarteaucitron.services.googlemaps = {
  349. "key": "googlemaps",
  350. "type": "api",
  351. "name": "Google Maps",
  352. "uri": "http://www.google.com/ads/preferences/",
  353. "needConsent": true,
  354. "cookies": [],
  355. "js": function () {
  356. "use strict";
  357. if (tarteaucitron.user.googlemapsApiKey === undefined) {
  358. return;
  359. }
  360. tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=tarteaucitron_googlemaps&key=' + tarteaucitron.user.googlemapsApiKey);
  361. },
  362. "fallback": function () {
  363. "use strict";
  364. var id = 'googlemaps';
  365. if (document.getElementById('tac_map-canvas')) {
  366. document.getElementById('tac_map-canvas').innerHTML = tarteaucitron.engage(id);
  367. }
  368. }
  369. };
  370. // google tag manager
  371. tarteaucitron.services.googletagmanager = {
  372. "key": "googletagmanager",
  373. "type": "api",
  374. "name": "Google Tag Manager",
  375. "uri": "http://www.google.com/ads/preferences/",
  376. "needConsent": true,
  377. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  378. "js": function () {
  379. "use strict";
  380. if (tarteaucitron.user.googletagmanagerId === undefined) {
  381. return;
  382. }
  383. window.dataLayer = window.dataLayer || [];
  384. window.dataLayer.push({
  385. 'gtm.start': new Date().getTime(),
  386. event: 'gtm.js'
  387. });
  388. tarteaucitron.addScript('//www.googletagmanager.com/gtm.js?id=' + tarteaucitron.user.googletagmanagerId);
  389. }
  390. };
  391. // jsapi
  392. tarteaucitron.services.jsapi = {
  393. "key": "jsapi",
  394. "type": "api",
  395. "name": "Google jsapi",
  396. "uri": "http://www.google.com/policies/privacy/",
  397. "needConsent": true,
  398. "cookies": [],
  399. "js": function () {
  400. "use strict";
  401. tarteaucitron.addScript('//www.google.com/jsapi');
  402. }
  403. };
  404. // linkedin
  405. tarteaucitron.services.linkedin = {
  406. "key": "linkedin",
  407. "type": "social",
  408. "name": "Linkedin",
  409. "uri": "https://www.linkedin.com/legal/cookie_policy",
  410. "needConsent": true,
  411. "cookies": [],
  412. "js": function () {
  413. "use strict";
  414. tarteaucitron.fallback(['tacLinkedin'], '');
  415. tarteaucitron.addScript('//platform.linkedin.com/in.js');
  416. },
  417. "fallback": function () {
  418. "use strict";
  419. var id = 'linkedin';
  420. tarteaucitron.fallback(['tacLinkedin'], tarteaucitron.engage(id));
  421. }
  422. };
  423. // pinterest
  424. tarteaucitron.services.pinterest = {
  425. "key": "pinterest",
  426. "type": "social",
  427. "name": "Pinterest",
  428. "uri": "https://about.pinterest.com/privacy-policy",
  429. "needConsent": true,
  430. "cookies": [],
  431. "js": function () {
  432. "use strict";
  433. tarteaucitron.addScript('//assets.pinterest.com/js/pinit.js');
  434. }
  435. };
  436. // shareaholic
  437. tarteaucitron.services.shareaholic = {
  438. "key": "shareaholic",
  439. "type": "social",
  440. "name": "Shareaholic",
  441. "uri": "https://shareaholic.com/privacy/choices",
  442. "needConsent": true,
  443. "cookies": ['__utma', '__utmb', '__utmc', '__utmz', '__utmt_Shareaholic%20Pageviews'],
  444. "js": function () {
  445. "use strict";
  446. if (tarteaucitron.user.shareaholicSiteId === undefined) {
  447. return;
  448. }
  449. tarteaucitron.fallback(['shareaholic-canvas'], '');
  450. tarteaucitron.addScript('//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js', '', function () {
  451. try {
  452. Shareaholic.init(tarteaucitron.user.shareaholicSiteId);
  453. } catch (e) {}
  454. });
  455. },
  456. "fallback": function () {
  457. "use strict";
  458. var id = 'shareaholic';
  459. tarteaucitron.fallback(['shareaholic-canvas'], tarteaucitron.engage(id));
  460. }
  461. };
  462. // sharethis
  463. tarteaucitron.services.sharethis = {
  464. "key": "sharethis",
  465. "type": "social",
  466. "name": "ShareThis",
  467. "uri": "http://www.sharethis.com/legal/privacy/",
  468. "needConsent": true,
  469. "cookies": ['__unam'],
  470. "js": function () {
  471. "use strict";
  472. if (tarteaucitron.user.sharethisPublisher === undefined) {
  473. return;
  474. }
  475. var switchTo5x = true,
  476. uri = ('https:' === document.location.protocol ? 'https://ws' : 'http://w') + '.sharethis.com/button/buttons.js';
  477. tarteaucitron.fallback(['tacSharethis'], '');
  478. tarteaucitron.addScript(uri, '', function () {
  479. stLight.options({publisher: tarteaucitron.user.sharethisPublisher, doNotHash: false, doNotCopy: false, hashAddressBar: false});
  480. });
  481. },
  482. "fallback": function () {
  483. "use strict";
  484. var id = 'sharethis';
  485. tarteaucitron.fallback(['tacSharethis'], tarteaucitron.engage(id));
  486. }
  487. };
  488. // typekit
  489. tarteaucitron.services.typekit = {
  490. "key": "typekit",
  491. "type": "api",
  492. "name": "Typekit (adobe)",
  493. "uri": "http://www.adobe.com/fr/privacy.html",
  494. "needConsent": true,
  495. "cookies": [],
  496. "js": function () {
  497. "use strict";
  498. if (tarteaucitron.user.typekitId === undefined) {
  499. return;
  500. }
  501. tarteaucitron.addScript('//use.typekit.net/' + tarteaucitron.user.typekitId + '.js', '', function () {
  502. try {
  503. Typekit.load();
  504. } catch (e) {}
  505. });
  506. }
  507. };
  508. // twitter
  509. tarteaucitron.services.twitter = {
  510. "key": "twitter",
  511. "type": "social",
  512. "name": "Twitter",
  513. "uri": "https://support.twitter.com/articles/20170514",
  514. "needConsent": true,
  515. "cookies": [],
  516. "js": function () {
  517. "use strict";
  518. tarteaucitron.fallback(['tacTwitter'], '');
  519. tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
  520. },
  521. "fallback": function () {
  522. "use strict";
  523. var id = 'twitter';
  524. tarteaucitron.fallback(['tacTwitter'], tarteaucitron.engage(id));
  525. }
  526. };
  527. // user voice
  528. tarteaucitron.services.uservoice = {
  529. "key": "uservoice",
  530. "type": "support",
  531. "name": "UserVoice",
  532. "uri": "https://www.uservoice.com/privacy/",
  533. "needConsent": true,
  534. "cookies": [],
  535. "js": function () {
  536. "use strict";
  537. if (tarteaucitron.user.userVoiceApi === undefined) {
  538. return;
  539. }
  540. tarteaucitron.addScript('//widget.uservoice.com/' + tarteaucitron.user.userVoiceApi + '.js');
  541. }
  542. };
  543. // vimeo
  544. tarteaucitron.services.vimeo = {
  545. "key": "vimeo",
  546. "type": "video",
  547. "name": "Vimeo",
  548. "uri": "http://vimeo.com/privacy",
  549. "needConsent": true,
  550. "cookies": ['__utmt_player', '__utma', '__utmb', '__utmc', '__utmv', 'vuid', '__utmz', 'player'],
  551. "js": function () {
  552. "use strict";
  553. tarteaucitron.fallback(['vimeo_player'], function (x) {
  554. var video_id = x.getAttribute("videoID"),
  555. video_width = x.getAttribute("width"),
  556. frame_width = 'width=',
  557. video_height = x.getAttribute("height"),
  558. frame_height = 'height=',
  559. video_frame;
  560. if (video_id === undefined) {
  561. return "";
  562. }
  563. if (video_width !== undefined) {
  564. frame_width += '"' + video_width + '" ';
  565. } else {
  566. frame_width += '"" ';
  567. }
  568. if (video_height !== undefined) {
  569. frame_height += '"' + video_height + '" ';
  570. } else {
  571. frame_height += '"" ';
  572. }
  573. video_frame = '<iframe src="//player.vimeo.com/video/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
  574. return video_frame;
  575. });
  576. },
  577. "fallback": function () {
  578. "use strict";
  579. var id = 'vimeo';
  580. tarteaucitron.fallback(['vimeo_player'], tarteaucitron.engage(id));
  581. }
  582. };
  583. // visualrevenue
  584. tarteaucitron.services.visualrevenue = {
  585. "key": "visualrevenue",
  586. "type": "analytic",
  587. "name": "VisualRevenue",
  588. "uri": "http://www.outbrain.com/legal/privacy-713/",
  589. "needConsent": true,
  590. "cookies": ['__vrf', '__vrm', '__vrl', '__vry', '__vru', '__vrid', '__vrz'],
  591. "js": function () {
  592. "use strict";
  593. if (tarteaucitron.user.visualrevenueId === undefined) {
  594. return;
  595. }
  596. window._vrq = window._vrq || [];
  597. window._vrq.push(['id', tarteaucitron.user.visualrevenueId]);
  598. window._vrq.push(['automate', true]);
  599. window._vrq.push(['track', function () {}]);
  600. tarteaucitron.addScript('http://a.visualrevenue.com/vrs.js');
  601. }
  602. };
  603. // xiti
  604. tarteaucitron.services.xiti = {
  605. "key": "xiti",
  606. "type": "analytic",
  607. "name": "Xiti",
  608. "uri": "http://www.atinternet.com/politique-du-respect-de-la-vie-privee/",
  609. "needConsent": true,
  610. "cookies": [],
  611. "js": function () {
  612. "use strict";
  613. if (tarteaucitron.user.xitiId === undefined) {
  614. return;
  615. }
  616. var Xt_param = 's=' + tarteaucitron.user.xitiId + '&p=',
  617. Xt_r,
  618. Xt_h,
  619. Xt_i,
  620. Xt_s,
  621. div = document.createElement('div');
  622. try {
  623. Xt_r = top.document.referrer;
  624. } catch (e) {
  625. Xt_r = document.referrer;
  626. }
  627. Xt_h = new Date();
  628. Xt_i = '<img style="display:none" border="0" alt="" ';
  629. Xt_i += 'src="http://logv3.xiti.com/hit.xiti?' + Xt_param;
  630. Xt_i += '&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
  631. if (parseFloat(navigator.appVersion) >= 4) {
  632. Xt_s = screen;
  633. Xt_i += '&r=' + Xt_s.width + 'x' + Xt_s.height + 'x' + Xt_s.pixelDepth + 'x' + Xt_s.colorDepth;
  634. }
  635. div.innerHTML = Xt_i + '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$') + '" title="Internet Audience">';
  636. document.getElementsByTagName('body')[0].appendChild(div.firstChild);
  637. if (typeof tarteaucitron.user.xitiMore === 'function') {
  638. tarteaucitron.user.xitiMore();
  639. }
  640. }
  641. };
  642. // youtube
  643. tarteaucitron.services.youtube = {
  644. "key": "youtube",
  645. "type": "video",
  646. "name": "YouTube",
  647. "uri": "https://www.google.fr/intl/fr/policies/privacy/",
  648. "needConsent": true,
  649. "cookies": ['VISITOR_INFO1_LIVE', 'YSC', 'PREF', 'GEUP'],
  650. "js": function () {
  651. "use strict";
  652. tarteaucitron.fallback(['youtube_player'], function (x) {
  653. var video_id = x.getAttribute("videoID"),
  654. video_width = x.getAttribute("width"),
  655. frame_width = 'width=',
  656. video_height = x.getAttribute("height"),
  657. frame_height = 'height=',
  658. video_frame;
  659. if (video_id === undefined) {
  660. return "";
  661. }
  662. if (video_width !== undefined) {
  663. frame_width += '"' + video_width + '" ';
  664. } else {
  665. frame_width += '"" ';
  666. }
  667. if (video_height !== undefined) {
  668. frame_height += '"' + video_height + '" ';
  669. } else {
  670. frame_height += '"" ';
  671. }
  672. video_frame = '<iframe type="text/html" ' + frame_width + frame_height + ' src="//www.youtube.com/embed/' + video_id + ' " frameborder="0"></iframe>';
  673. return video_frame;
  674. });
  675. },
  676. "fallback": function () {
  677. "use strict";
  678. var id = 'youtube';
  679. tarteaucitron.fallback(['youtube_player'], tarteaucitron.engage(id));
  680. }
  681. };
  682. // zopim
  683. tarteaucitron.services.zopim = {
  684. "key": "zopim",
  685. "type": "support",
  686. "name": "Zopim",
  687. "uri": "https://www.zopim.com/privacy",
  688. "needConsent": true,
  689. "cookies": ['__zlcid', '__zprivacy'],
  690. "js": function () {
  691. "use strict";
  692. if (tarteaucitron.user.zopimID === undefined) {
  693. return;
  694. }
  695. tarteaucitron.addScript('//v2.zopim.com/?' + tarteaucitron.user.zopimID);
  696. }
  697. };