如果页面不存在但被定向到工作页面,有没有办法跟踪 URL 流量?
Is there a way to track an URL traffics if the page doesn't exist but was directed to a working page?
- 用户在浏览器上输入https://example.com/mypage
- .httaccess 重定向到 https://example.com/myfinallandingpage
我想跟踪 /mypage 的流量。
/mypage 不是实际页面,但 /myfinallandingpage 是工作页面。
有人知道这样做的方法吗?
开箱即用,您无法测量服务器端重定向,例如 301 或 302,因为浏览器 JavaScript,因此 Google 分析不会在重定向源页面上执行。
但是你可以通过做一些定制:
- 在重定向目标页面上插入一个 URL 参数 例如
https://example.org/destination-page?ref=https://example.org/source-page
并在该目标页面上跟踪您想要的任何内容
- 执行服务器端跟踪:你可以处理你的redirects at PHP level, allowing you to use a GA server-side tracking library with GA Client ID retrieved via the cookies in HTTP headers
- 用户在浏览器上输入https://example.com/mypage
- .httaccess 重定向到 https://example.com/myfinallandingpage
我想跟踪 /mypage 的流量。 /mypage 不是实际页面,但 /myfinallandingpage 是工作页面。
有人知道这样做的方法吗?
开箱即用,您无法测量服务器端重定向,例如 301 或 302,因为浏览器 JavaScript,因此 Google 分析不会在重定向源页面上执行。
但是你可以通过做一些定制:
- 在重定向目标页面上插入一个 URL 参数 例如
https://example.org/destination-page?ref=https://example.org/source-page
并在该目标页面上跟踪您想要的任何内容 - 执行服务器端跟踪:你可以处理你的redirects at PHP level, allowing you to use a GA server-side tracking library with GA Client ID retrieved via the cookies in HTTP headers