{"id":10,"type":"Article","title":"Where 出现在哪些页面？","slug":"distribution-page-setting","content":"在完成 X-SDK 集成，设置好评价/问卷的题目和样式之后，你可以在浩客后台来定义评价与问卷出现的位置，比如：出现在官网，出现在系统内，或者出现在某个特定的位置。\r\n\r\n在本文中，我们将介绍如何设置一个问卷/评价出现在网站/小程序的具体位置。\r\n\r\n此处的网址匹配将会匹配完整的 URL，包括链接里的参数信息，比如 params=xx\u0026type=zzz 等\r\n\r\n---\r\n# 在网站中配置投放页面\r\n## **1. 显示页面设置**\r\n\r\n进入到评价/问卷的投放设置里，可以选择出现的位置为：全部页面和特定页面。\r\n\r\n![](https://help-assets.jinshuju.net/assets/file/1276/WeChatWorkScreenshot_d35c1d82-68c9-4729-9cef-423db7b2d003.png)\r\n\r\n## **2. 投放至所有页面**\r\n\r\n在所有集成了 X-SDK，且符合所绑定应用网址的页面下，都会出现该评价/问卷。如果网址是根域名，那么该域名下的所有子域名也都符合规则。\r\n\r\n**注意，当一个页面上，有多个评价/问卷符合投放规则时，有且只有 1 个评价/反馈会被呈现出来。**\r\n\r\n## **3. 投放至特定页面**\r\n\r\n可以根据网址的进行页面匹配，目前支持：等于、开头是、通配符匹配三种规则，且支持创建多个并列的条件组。\r\n\r\n![](https://help-assets.jinshuju.net/assets/file/1277/WeChatWorkScreenshot_d1f4a0e5-8adc-4715-b166-72d0f9cb6357.png)\r\n\r\n**1. 网址等于**\r\n\r\n精准匹配，会完全对比当前 URL 和所设定的规则。\r\n\r\n示例：\r\n\u003ctable\u003e\r\n    \u003ctr\u003e\r\n        \u003cth\u003e投放页面配置 URL\u003c/th\u003e\u003cth\u003e示例 URL\u003c/th\u003e\u003cth\u003e是否投放\u003c/th\u003e\u003cth\u003e说明\u003c/th\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd rowspan=\"6\"\u003e 等于 https://x.example.com/page1?x=1  \u003c/td\u003e\u003ctd\u003ehttps://x.example.com/page1/\u003c/td\u003e\u003ctd\u003e不投放\u003c/td\u003e\u003ctd\u003e 配置要求pages后面有 ?x=1 ，但给出的URL没有\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n        \u003ctd\u003e https://x.example.com/page1?x=1\u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003ehttps://x.example.com/page1?x=1\u0026y=2\u003c/td\u003e\u003ctd\u003e不投放\u003c/td\u003e\u003ctd\u003e 配置要求?x=1后面没有参数 ，但给出的URL多出 \u0026y=2 \u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003ehttps://x.example.com/page1?y=2\u0026x=1 \u003c/td\u003e\u003ctd\u003e不投放\u003c/td\u003e\u003ctd\u003e配置要求page1后面的参数为  ?x=1 ，但给出的URL多出 \u0026y=2\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n        \u003ctd\u003ehttps://x.example.com/page1/page2?x=1\u003c/td\u003e\u003ctd\u003e不投放\u003c/td\u003e\u003ctd\u003e配置要求page1后面没有path ，但给出的URL多出 /page2 \u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n**2. 开头是**\r\n\r\n模糊匹配，从当前 URL 的第一个字符匹配至所设定的最后一个字符。\r\n\r\n示例：\r\n\u003ctable\u003e\r\n    \u003ctr\u003e\r\n        \u003cth\u003e投放页面配置 URL\u003c/th\u003e\u003cth\u003e示例 URL\u003c/th\u003e\u003cth\u003e是否投放\u003c/th\u003e\u003cth\u003e说明\u003c/th\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd rowspan=\"6\"\u003e 开头是  https://x.example.com/sites/ \u003c/td\u003e\u003ctd\u003ehttps://x.example.com/sites/\u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n        \u003ctd\u003e https://x.example.com/sites\u003c/td\u003e\u003ctd\u003e不投放\u003c/td\u003e\u003ctd\u003e 配置要求sites后面有 / ，但给出的URL没有  \u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003e https://x.example.com/sites/price\u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e  URL开头一致  \u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003ehttps://x.example.com/sites?x=1\u0026y=2\u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003eURL开头一致\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n        \u003ctd\u003ehttps://x.example.com/sites?y=2\u0026x=1\u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003eURL开头一致\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t \u003ctr\u003e\r\n        \u003ctd\u003ehttps://x.example.com/pages\u003c/td\u003e\u003ctd\u003e不投放\u003c/td\u003e\u003ctd\u003e配置要求pages前面有/sites ，但给出的URL没有\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n**3. 匹配通配符**\r\n\r\n模糊匹配，目前我们支持的通配符为星号(\\*)，用来代替 1 个或多个字符。例如：\r\n\r\n示例：\r\n\r\n\u003ctable\u003e\r\n    \u003ctr\u003e\r\n        \u003cth\u003e投放页面配置 URL\u003c/th\u003e\u003cth\u003e示例 URL\u003c/th\u003e\u003cth\u003e是否投放\u003c/th\u003e\u003cth\u003e说明\u003c/th\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd rowspan=\"3\"\u003e https://*.example.com/pages \u003c/td\u003e\u003ctd\u003e https://one.example.com/pages \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e在所有的子域名投放\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003e https://one.two.example.com/pages \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e在所有的子域名投放\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003e https://example.com/pages \u003c/td\u003e\u003ctd\u003e不投放\u003c/td\u003e\u003ctd\u003e配置要求example前面有子域名，但给出的URL没有\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t \u003ctr\u003e\r\n        \u003ctd rowspan=\"5\"\u003e https://example.com/pages/* \u003c/td\u003e\u003ctd\u003e https://example.com/pages/ \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003e https://example.com/pages \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003e https://example.com/pages/page1 \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t\u003ctr\u003e\r\n        \u003ctd\u003e https://example.com/pages/page1/page2 \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t\t\t\u003ctr\u003e\r\n        \u003ctd\u003e https://example.com/pages/page1?x=1\u0026y=1 \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\t\t \u003ctr\u003e\r\n        \u003ctd rowspan=\"3\"\u003e https://example.com/*/pages \u003c/td\u003e\u003ctd\u003e https://example.com/pages \u003c/td\u003e\u003ctd\u003e不投放\u003c/td\u003e\u003ctd\u003e配置要求pages前还有其他path，但给出的URL没有\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003e https://example.com/page1/pages \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n        \u003ctd\u003e https://example.com/page1/page2/pages \u003c/td\u003e\u003ctd\u003e投放\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\r\n    \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n## **4. 排除以下页面**\r\n\r\n问卷/评价可以在投放页面规则里设置**「排除以下页面」**规则，以决定不投放到某些页面， 最多配置**10**个条件，多个条件之间关系为**「或」**。\r\n\r\n![](https://help-assets.jinshuju.net/assets/file/1279/WeChatWorkScreenshot_d0b24a8d-4d95-4cdb-84b2-32c176d90243.png)\r\n\r\n# 在小程序中配置投放页面\r\n目前浩客系统也支持对小程序应用下的评价/问卷进行投放页面设置，具体设置方法同上。如果评价/问卷需要投放在小程序中的特定页面，或者投放时需要排除某些页面，你需要提前确定需要投放或排除的小程序页面路径，填充在条件输入框中即可。\r\n![](https://help-assets.jinshuju.net/assets/file/1278/WeChatWorkScreenshot_fa03dfbf-1433-4917-82ce-beb120d02c4d.png)\r\n\r\n# 常见问题排查\r\n**1、问题描述：**\r\n\r\n- 没有投放 `https://xxx/welcome` ，但是进入 `https://xxx/welcome` 时展示了问卷，但在页面 `https://xxx/welcome` 刷新后，不展示问卷\r\n\r\n**排查方案：**\r\n\r\n- step1:检查问卷的投放设置为投放特定页面 `https://xxx/docs/* ` ,排出投放页面 `https://xxx/welcome`\r\n \r\n- step2:访问页面，发现在进入`https://xxx/welcome`前，路由访问了`https://xxx/docs/my`后，跳转到了`https://xxx/welcome`，导致投放规则匹配上，最终在`https://xxx/welcome`展示了问卷\r\n\r\n**解决方案：**\r\n\r\n-  调整投放页面配置为 投放特定页面 `https://xxx/docs/* ` ,排出投放页面 `https://xxx/welcome`，排除投放页面`https://xxx/docs/my`\r\n\r\n\r\n","featured":false,"category_id":18,"created_at":"2023-02-15T00:27:04.405Z","updated_at":"2023-09-08T02:41:34.196Z"}