Referrer Input for Contact Form 7

Contact Form 7 Addon that creates a cache-resistant input that contains the URL of the page the user visited before the contact form page.

Author:Pravin Parmar (profile at wordpress.org)
WordPress version required:5.0
WordPress version tested:5.4.1
Plugin version:1.0.1
Added to WordPress repository:05-05-2018
Last updated:20-05-2020
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:1
Plugin URI:http://www.pravinparmar.com
Total downloads:1 300
Active installs:40+
plugin download
Click to start download

Addon for Contact Form 7 that creates a new kind of input that contains the URL of the page the user visited before the contact form page.

You can choose where in your email to introduce this info by using a mail-tag, like any other field.

How to use it?

Once you have installed and activated your plugin, a new type of field will be available in your Contact Form 7 forms. In order to add it to your form, you can either click on the “Referrer” button above your form editor, or add the shortcode like: [cf7rfr_referrer {your-referrer}] ({your-referrer} has to be replaced by the name you want to give the field)

To recover the field’s info on your email, use this tag: [{your-referrer}]. It will print a URL.

What referrer in Contact Form 7?

This plugin looks at the HTTP referrer. Not at the traffic source. So, if your user comes from google, clicks some links in your site and ends up in your contact form page, the field will contain the last page in your site your client visited. It will not tell you whether the client landed from Google. This is meant to give you some context to the user’s message. Sometimes, they say “I love this product!” but you have no idea which one they are talking about. With the referrer field, at least you know what they saw last.

This plugin works well with cache plugins, because the field is filled using javascript on the user’s computer in stead of the server.


FAQ
ChangeLog