tarteaucitron.services.js 23 KB

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