我有一个网站,只有一个名为products.php
的页面,我用类似products.php?category=books
的查询字符串显示不同的类别(大约50个(。现在,我已经为url products.php?category=books
设置了内容实验,一切都很好,只是当我尝试访问任何其他类别时,我会被重定向到前面提到的books
类别。我该怎么做?
理想情况下,我想设置一个适用于每个类别的"动态"实验,但如果我只设置一个类别,而其他所有类别都不会重定向到books
类别,我可以接受。感谢您的帮助。
实际上,解决方案最终非常简单:只需使用原始url products.php
设置内容实验,而不需要额外的参数,因为它们(如果存在(将被传播,正如谷歌官方分析支持页面上所解释的那样
3. URL parameters in your variation pages
If you set URL parameters in your variation pages, then Experiments incorporates
them into what the visitor sees. Let’s say you set your experiment pages as:
Original page: www.example.com/a
Variation page: www.example.com/b?id=50
If visitors arrive with no URL parameters, then they see one of these two pages:
Original page: www.example.com/a
Variation page: www.example.com/b?id=50
If visitors arrive with URL parameters that conflict, then the URL parameters you
supplied during the experiment setup override the URL parameters that visitors
arrive with.
For example, if the visitor clicks a link to www.example.com/a?id=1, the visitor sees one of these two pages:
Original page: www.example.com/a?id=1
Variation page: www.example.com/b?id=50
If visitors arrive with URL parameters that don’t conflict, then the URL parameters are
appended to the page URL. For example, if the visitor clicks a link to
www.example.com/a?cat=1, then the visitor sees one of these two pages:
Original page: www.example.com/a?cat=1
Variation page: www.example.com/b?id=50&cat=1