From a761105ec18f8eabf5a9fb7a971805ee9af3de32 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 29 May 2015 18:19:23 +0200 Subject: [PATCH] Add Crazyegg --- tarteaucitron.services.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index f6628a6..2a03689 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -215,6 +215,25 @@ tarteaucitron.services.clicmanager = { } }; +// crazyegg +tarteaucitron.services.crazyegg = { + "key": "crazyegg", + "type": "analytic", + "name": "Crazy Egg", + "uri": "https://www.crazyegg.com/privacy", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + if (tarteaucitron.user.crazyeggId === undefined) { + return; + } + + tarteaucitron.addScript('//script.crazyegg.com/pages/scripts/' + tarteaucitron.user.crazyeggId.substr(0, 4) + '/' + tarteaucitron.user.crazyeggId.substr(4, 4) + '.js'); + } +}; + // criteo tarteaucitron.services.criteo = { "key": "criteo",