Google Analytics(分析) - 跟踪非标准查询字符串 [英] Google Analytics - Tracking Nonstandard Query Strings

查看:125
本文介绍了Google Analytics(分析) - 跟踪非标准查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Google Analytics中跟踪查询字符串,但我遇到了问题。我有太多的变数适合Google提供的正常设置。它们允许您设置utm_source,utm_medium,utm_term,utm_content和utm_campaign。我需要另一个,我们称之为my_qs。



因此,我的网址如下所示:





然后,您可以在您的代码中为您的自定义维度提供my_qs参数作为值。确保您已经在GA帐户中首先定义并配置了它。


I am trying to track query strings in Google Analytics, but I have a problem. I have too many variables to fit in the "normal set" provided by Google. They allow you to set utm_source, utm_medium, utm_term, utm_content and utm_campaign. I need another one, let's call it my_qs.

So my URL would look like:

http://example.com?utm_source=stack-exchange&utm_medium=web&utm_term=google-analytics&utm_content=nonstandard-query-strings&utm_campaign=answers&my_qs=gotmike

I can obviously find reports for all the standard query strings in Google Analytics, but I'm having a tough time figuring out how to run reports on these other variables that show up in the URLs.

I looked into Custom Variables, and they seem like something that is set by the Google Analytics code, not by the query string in the URL.

Maybe the answer is to write some javascript to grab my query string and store it as a Custom Variable in Google Analytics?

I read several articles about creating Custom Variables based on data stored on your website, but I'd really like to provide a simple URL link back to my website and get the data from the query string based on a user clicking that link.

Any ideas on how to accomplish this?

解决方案

If you are using GTM, then you can grab the query parameter quite easily by creating your own variable to grab your qp. The variable would look something like this:

You could then provide "my_qs parameter" as a value for your Custom Dimension in your tags. Make sure you have already defined and configured this in your GA account first.

这篇关于Google Analytics(分析) - 跟踪非标准查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆