254.710.928453
254.726.906662
support@websitehostingkenya.com
hello@websitehostingkenya.com

Track WordPress Page/Post URL Form Submissions in Contact Form 7

Track WordPress Page/Post URL Form Submissions in Contact Form 7
Pete

I was recently asked to set up a WordPress site, with a contact form which could be placed into all product catalogue pages.

No problem, the Contact Form 7 plugin lets me set up a contact form, and gives me a handy shortcode which I can use to insert the form anywhere within a page or post.

BUT, they also wanted to know which page the form was submitted from, so that they could track the page from which the enquiry was sent, and send relevant information based on which page the user filled out the form on.

So I had a look at the Contact Form 7 documentation where I found that there are some special mail tags you can add into your message body, to collect more detailed information about the form submission.

To collect the URL of the page where the form was submitted, you just need to paste [_post_url] into the message body of your contact form.

 

 

There are several other special mail tags you can use if you want to collect more details, such as post author, post date or sender’s IP address.


Leave a Reply

Your email address will not be published. Required fields are marked *