Link to home
Start Free TrialLog in
Avatar of tf2012
tf2012

asked on

wordpress page prevent direct access to thankyou page

I have a wordpress site that has a booking form and a thankyou page.  Google Analytics is showing conversions on the thankyou page but the people seem to be navigating directly to the thankyou page.  

In wordpress or via htaccess or php function what is the best way to redirect visitors who are navigating directly?  In other words if someone saved the thankyou page url and opened later I want to send them directly to the home page without triggering a conversion on the thankyou page.
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

You can check the HTTP_REFERRER header on the thank you page. If set, it should tell you what page the user came from in order to reach the thank you page. If it's not set to the correct form URL, then it's -probably- a bookmarked URL. Granted, HTTP_REFERRER is an optional HTTP header, but it is typically sent.
ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tf2012
tf2012

ASKER

thanks I'll test it out today
Avatar of tf2012

ASKER

Worked fine thanks!