From d7914dea8a59068b1d0b03ba948e5584f266e8e1 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 14 Mar 2015 16:08:13 +0200 Subject: [PATCH] Use a custom dimension instead of events for theme tracking --- js/90-ga.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/90-ga.js b/js/90-ga.js index 7e7feed..fece905 100644 --- a/js/90-ga.js +++ b/js/90-ga.js @@ -7,8 +7,8 @@ if(!dnt) { })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-47497115-1', 'mindcoding.ro'); - ga('send', 'pageview'); var theme = localStorage.getItem("theme"); if(theme) - ga('send', 'event', 'theme', theme); + ga('set', 'dimension1', theme); + ga('send', 'pageview'); } -- 2.39.2