tarteaucitron.services.js 35 KB

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