【问题标题】:To check if the user came to website by clicking Google adwords检查用户是否通过点击 Google Adwords 访问网站
【发布时间】:2017-10-23 07:19:32
【问题描述】:

我们正在通过 PHP WordPress 运行网站。我们还在 Google adwords 中提供网站广告。当一些用户点击广告时,它会登陆网站上的一个页面。在那个页面上,我想知道用户是通过点击 Google Adwords 还是通过其他方式进入页面的。

有什么办法可以做到吗?当用户登陆网页时我应该检查什么? (推荐人等)

【问题讨论】:

  • 您可以先检查您的推荐人https://stackoverflow.com/questions/1864583/get-original-url-referer-with-php,然后根据您的目的设置 if else 条件。如果 rerefer adwords 做其他事情,做其他事情

标签: php wordpress google-ads-api referrer


【解决方案1】:

当您制作 Google AdWords 广告系列时,请使用特殊的点击网址,其中包含您可以验证的查询字符串。像这样:

https://your.domain/page.php?from=adwords

然后,可以在服务器端通过检查查询字符串参数来检查它,如下所示:

<?php
    if ($_GET['from'] == "adwords") {
        /* do special stuff, like store things in a database */

        /* Finally, maybe redirect them to some other page, if necessary */
        header('Location: /');
    }
?>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-16
    • 1970-01-01
    • 2011-12-27
    相关资源
    最近更新 更多