Kynetx 插件与站点标签——如何区分?
我的应用程序有一个主页,您可以在其中下载和安装插件。它还使用站点标签来调用相同的规则集,以向潜在用户展示该应用程序的功能。
我想隐藏插件并将该 div 替换为“感谢安装插件”。如何区分从网站标签调用的 KRL 和从插件调用的 KRL?
这是我的想法,但也许有更好的方法?
选项1:使用页面参数,可能插件看不到它。 选项 2:使用调用我的主规则集的第二个规则集。插件规则集将隐藏插件 div 并取消隐藏“谢谢”div。我只需要让主要规则集支持显式事件即可。
My application has a homepage where you can download and install the plugins. It also uses site tags to call the same ruleset to show potential users what the app does.
I'd like to hide the plugins and replace that div with one that says 'Thanks for installing the plugin.' How can I tell the difference between KRL called from the site tags and KRL called from the plugin?
Here's my ideas, but perhaps there is a better way?
Option 1: Use page parameter, maybe the plugin won't see it.
Option 2: Use a second ruleset that calls into my primary ruleset. The plugin ruleset will hide the plugin div and unhide the 'thank you' div. I just have to have the primary ruleset support explicit events.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您所说,我认为您最好的选择是使用页面参数。这只会从您的网站标签发送到规则集,而不是从浏览器扩展发送到规则集,因此这应该可以解决您的问题。您的网站标签将如下所示:
然后在您的应用程序中,您只需检查
page:param
并对其执行任何您想要的操作:请参阅 文档中了解更多信息。希望有帮助!
I think your best option is to use a page parameter, as you said. This will only be sent to the ruleset from your site tags--not from the browser extension--so that should solve your problem. Your site tags will look something like this:
Then in your app you just have to check the
page:param
and do whatever you want with it:See here in the docs for more information. Hope that helps!