如何从URL传递关键字,但保持隐藏? (的Adwords) [英] How to pass a keyword from URL but keep it hidden? (Adwords)

查看:127
本文介绍了如何从URL传递关键字,但保持隐藏? (的Adwords)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我基本上想知道将用户带到我的网站的关键字,但是将其从用户身上隐藏起来。因此...在我的广告中,我可以将网址设置为domain.com?keyword=KW,然后将关键字存储在PHP变量中,以便我可以在自己的电子邮件/短信中使用它。我真的不希望它显示在URL中,因为它看起来有点混乱。



有没有什么方法可以实现这个目标?



感谢!

解决方案

在用户访问您的网站后执行重定向:

  if(isset($ _ GET ['keyword'])){
//完成您需要做的任何功能关键字数据
$ keyword = $ _GET ['keyword'];
//重定向
header(Location:/);
}

显然,该位置应该是您要发送用户的位置。
/会将他放在他所在的页面/根目录。

I'd essentially like to know the keyword that takes a user to my site, but then hide it from the user. So...in my ads I could set up the URL as domain.com?keyword=KW, and then store the keyword in a PHP variable so that I can use it in emails/SMS messages to myself. I don't really want it shown in the URL though as it looks kind of messy.

Is there any way to actually achieve this?

Thanks!

解决方案

Just do a redirect after the user gets to your site:

if(isset($_GET['keyword'])){
   //do whatever function you need to do with the keyword data
   $keyword = $_GET['keyword'];
   //redirect
   header("Location: /");
}

Obviously the location should be where you want to send the user. The "/" will put him at the page/root of where he was.

这篇关于如何从URL传递关键字,但保持隐藏? (的Adwords)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆