我正在尝试让自定义维度在 Google Analytics(分析)中运行,但无法让它们显示出来。我的代码如下。我究竟做错了什么?
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('set', {
'dimension1': 'users-email-address@xyz.com',
'dimension2': 'users-id'
});
ga('create', 'UA-XXXXXXXX-X', 'xxxxxxxxxx.com');
ga('send', 'pageview');
</script>