diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index ad948cf..c6b5a6e 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -30,6 +30,44 @@ tarteaucitron.services.iframe = { } }; +// amplitude +tarteaucitron.services.amplitude = { + "key": "amplitude", + "type": "analytic", + "name": "Amplitude", + "uri": "https://amplitude.com/privacy", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + if (tarteaucitron.user.amplitude === undefined) { + return; + } + tarteaucitron.addScript('https://cdn.amplitude.com/libs/amplitude-5.8.0-min.gz.js', '', function() { + + window.amplitude = { + _q: [], + _iq: {} + }; + function s(e,t){e.prototype[t]=function(){this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this}} + var o=function(){this._q=[];return this}; + var a=["add","append","clearAll","prepend","set","setOnce","unset"]; + for(var u=0;u