使用 GA 代码跟踪联属链接

发布于 2024-11-26 19:24:40 字数 563 浏览 6 评论 0原文

我有一个非常特殊的场景,我想在这里讨论。

我的系统基于会员链接共享。

有固定数量的联属网络营销共享链接(即源链接)。例如:

  http://example.com/affiliate/company1
  http://example.com/affiliate/company5
  http://example.com/affiliate/company3
  http://example.com/affiliate/company2
  http://example.com/affiliate/company4

现在,所有这些链接都重定向到(会说,目标链接):

  http://example.com/page-1.html

源链接实际上并不存在,并且我在 Apache 服务器上重写了规则,将任何具有“/affiliate/”的 URL 重定向到 index.php页面,我将它们重定向到目标链接,

我需要使用 Google Analytics 代码进行跟踪,但我无法更改/修改目标链接的内容。我怎样才能实现跟踪

I have a very special scenario that I like to discuss here.

My system is based on Affiliate Link Sharing.

There are fixed number of affiliate sharing links (will say, source links). For example:

  http://example.com/affiliate/company1
  http://example.com/affiliate/company5
  http://example.com/affiliate/company3
  http://example.com/affiliate/company2
  http://example.com/affiliate/company4

Now, all of these links redirect to (will say, target link):

  http://example.com/page-1.html

Source links don't exist in reality, and I have rewrite rules on Apache server that redirects any URL having '/affiliate/' to index.php page, where I redirect them to target link

I need to use Google Analytics Code for tracking, but I cannot change/modify contents of target link. How can I achieve tracking

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

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

发布评论

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

评论(1

小草泠泠 2024-12-03 19:24:40

您可以使用特殊查询参数重定向到目标: http://www.google.com/support/analyticshelp/bin/answer.py?answer=1033863&topic=1032998

目标必须具有 GA代码已安装。

更新:

如果目标没有安装GA代码,您可以尝试:

  • 在index.php中使用javascript进行重定向,并在该页面上添加GA代码。

或者

You can redirect to the target with special query parameters: http://www.google.com/support/analyticshelp/bin/answer.py?answer=1033863&topic=1032998

Target must have the GA code installed.

UPDATE:

If the target does not have the GA code installed, you can try:

  • Make the redirect with javascript in index.php and add the GA code on that page.

OR

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