简体   繁体   English

Google Analytics自定义参数名称

[英]Google Analytics Custom Parameter Name

I want to track if page views come from navbar, header, footer, etc. The Google Analytics parameters are long and annoying. 我想跟踪页面视图是否来自导航栏,页眉,页脚等.Google Analytics参数很长且很烦人。 Does Google Analytics support custom GET parameter names? Google Analytics是否支持自定义GET参数名称?
For example the url: 例如网址:

example.com/login?utm_source=navbar&utm_medium=local-click&utm_campaign=referer

Could be 可能

example.com/login?ref=nav

Any ideas? 有任何想法吗?

You could use Campaign Data Import . 您可以使用广告系列数据导入 Simply upload a file which maps one value to many, for example ga:campaignCode to ga:medium,ga:source,ga:dimension1 and in your tracking code simply set the campaignId from your ref=nav. 只需上传一个将一个值映射到多个的文件,例如ga:campaignCode到ga:medium,ga:source,ga:dimension1,在跟踪代码中只需设置来自ref = nav的campaignId。

// Create the tracker.
ga('create', 'UA-XXXX-Y', 'auto');

// Set the campaign code/id directly.
ga('set', 'campaignId', '1234');

// Send the page view.
ga('send', 'pageview');

In fact there is a good example of using url parameters to set values on tracker by using plugins along side of analytics.js. 实际上,通过在analytics.js旁边使用插件,可以使用url参数在跟踪器上设置值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM