OpenX:允许横幅链接使用显示横幅的页面的主机
我的客户有一个包含许多子域的网站,每个子域代表不同的“客户端”:
http://www.store.com <- 总店;也是管理中默认的 OpenX“网站”主机。
http://client1.store.com <- 客户端商店
http://client2.store.com <- 客户端商店
...
http://client222.store.com <- 客户端商店
很多横幅都是内部链接。对于这些内部广告,他们在该横幅的“目标 URL”字段中使用相对 URL,希望该链接将使用广告所显示的页面的主机。但无济于事,这些广告似乎总是使用该区域所连接的 OpenX“网站”的主机。
因此,对于这些本地广告,我需要目标 URL 的主机来匹配广告所显示的页面。有什么建议吗?
My client has a website with many subdomains, each representing a different "client":
http://www.store.com <- Main store; also the default OpenX "Website" host in admin.
http://client1.store.com <- Client store
http://client2.store.com <- Client store
...
http://client222.store.com <- Client store
A lot of the banners are internal links. For those internal ads, they use relative URLs in that banner's "Destination URL" field, in hopes that the link will use the host of the page the ad is being displayed on. But to no avail, the ads seem to always use the host of the OpenX "Website" that that zone is connected to.
So for these local ads I need the host of the destination URLs to match the page the ads is being displayed on. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题的答案是将横幅的 URL 设置为如下所示:
然后将额外的自定义变量
currenthost
传递到调用代码中。如果区域处于本地模式,
请在调用
view_local()
之前的某个位置设置如下变量:如果区域处于 Javascript 模式,
则将其传递到
openx/www/delivery/ajs。 php
作为 GET 字符串的一部分。把这个:变成这个:
The answer to this question was to set the Banner's URL to something like this:
Then pass extra, custom variable
currenthost
into the invocation code.If the zone is in Local Mode
Set the variable like this, somewhere before your call to
view_local()
:If the zone is in Javascript Mode
Pass it into
openx/www/delivery/ajs.php
as a part of the GET string. Turn this:Into this: