如何为我的 Google Analytics 服务器端请求设置不同的位置?

发布于 2024-12-21 09:19:04 字数 570 浏览 2 评论 0原文

我正在使用服务器端 C# 客户端(不是 JS,不涉及浏览器)对 google 分析发出一些请求。因此,当我使用要传递给分析的所有信息构建 gif 点击 url 时,我发送的参数之一是 utmip,我认为 google 会提取位置信息。

string utmGifLocation = "http://www.google-analytics.com/__utm.gif";
string utmUrl = utmGifLocation + "?" +
    "utmwv=" + Version +        
    "&utmhn=" + domainName +
    "&utmr=" + documentReferer +
    "&utmp=" + documentPath +
    "&utmac=" + account +
    "&utmip=" + remoteIP + ...
    ...

这就是我的问题:无论我使用什么IP来发出请求,谷歌都会将所有请求映射到同一个地方,也就是我发送请求的地方。那么,utmip 参数仍然有效吗?有人知道如何根据我的请求手动设置不同的位置吗?

I'm using an server-side c# client (its not JS, no browser involved) to make some requests on google analytics. So, when I'm constructing the gif hit url with all the information I want to pass to analytics, one of the parameters I'm sending is the utmip, which I suppose google would extract the location informations.

string utmGifLocation = "http://www.google-analytics.com/__utm.gif";
string utmUrl = utmGifLocation + "?" +
    "utmwv=" + Version +        
    "&utmhn=" + domainName +
    "&utmr=" + documentReferer +
    "&utmp=" + documentPath +
    "&utmac=" + account +
    "&utmip=" + remoteIP + ...
    ...

That's my problem: whatever ip I'm using to make the requests, google it's mapping all the requests to the same place, which is here, where I'm sending the requests. So, is that utmip parameter still working? Does anybody have any idea how to set manually different locations to my requests?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海里的那抹蓝 2024-12-28 09:19:04

<块引用>

在下面给出的服务器端代码段中,将您的 Analytics 网络媒体资源 ID 的前缀从 UA- 更改为 MO-。例如,如果您的网络媒体资源 ID 为 UA-12345-67,则您可以在服务器端代码段中使用 MO-12345-67。

并且,将 IP 地址设置为第四个八位字节为 0(零),因此 124.455.3.123 变为 124.455.3.0

utmip 可用于跟踪 gif 的移动请求。仅当您的网络媒体资源 ID 带有 MO 前缀时,该功能才可用。

Change the prefix on your Analytics web property ID from UA- to MO- in the server-side snippets given below. For example, if your web property ID is UA-12345-67, you would use MO-12345-67 in your server-side snippets.

And, set the IP address as so the fourth octect is 0 (zero) so 124.455.3.123 becomes 124.455.3.0

utmip is available for mobile requests of the tracking gif. It is only available if you prefix your web property ID with MO.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文