plugin-icon

track-incoming-referrer

作者:averageradical·
Track incoming referrer and write it to any hidden form field with the identifier "referrer".
评级
5
版本
1.0.0
活跃安装
10
最后更新
Jan 10, 2017

Non-technical summary: Track incoming referrer and write it to any hidden form field with the identifier “referrer” (this can be created in Contact Form 7, for example; see below). Also if the WordPress site redirects from HTTP to HTTPS, this plugin also overrides the redirect to add the referrer to the https URL.

Technical details: This plugin runs client-side JavaScript in every page in HEAD and if there isn’t a session cookie with the name “referrer”, then it writes a session cookie with the name “referrer” and the value of either document.referrer, or if that’s empty, the URL-encoded value of window.location.href. There is another client-side JavaScript in every page before which writes the value of the “referrer” cookie to any INPUT with the ID “referrer”, if it exists.

When integrating with Contact Form 7, add a hidden input field such as the following:

[hidden referrer id:referrer]

And then add to the Mail’s Message Body:

Referrer: [referrer]

If you’re just integrating this with HTML, just add this to any form:

<input type="hidden" id="referrer" name="referrer" />
免费使用Business套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 4.7.31
这个插件是可用的下载,适用于您的站点。