浏览代码

Merge pull request #200 from real34/patch-1

Add support for analytics pre-pageview userland logic
Amauri CHAMPEAUX 6 年之前
父节点
当前提交
3979039ece
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tarteaucitron.services.js

+ 4 - 0
tarteaucitron.services.js

@@ -1064,6 +1064,10 @@ tarteaucitron.services.analytics = {
                 ga('set', 'anonymizeIp', true);
                 ga('set', 'anonymizeIp', true);
             }
             }
 
 
+            if (typeof tarteaucitron.user.analyticsPrepare === 'function') {
+                tarteaucitron.user.analyticsPrepare();
+            }
+
             if (tarteaucitron.user.analyticsPageView) {
             if (tarteaucitron.user.analyticsPageView) {
                 ga('send', 'pageview', tarteaucitron.user.analyticsPageView);
                 ga('send', 'pageview', tarteaucitron.user.analyticsPageView);
             } else {
             } else {