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.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks I'll test it out today
ASKER
Worked fine thanks!