I am currently working on a form that has specific user related data on curl call which is why "$form->data" line is required. I have to add a tracking code (google) to a thank you page that needs to auto redirect after a certain time on the page. So the process would be like this:
- User completes form.
- Form redirects to thank you page with tracking code.
- Thank you page redirects to login page after say 10 seconds.
Here is the code I currently have on the thank you page, that as far as I know does not trigger the Google tracking code because it redirects immediately:
<?php header('Location: '. $form->data['curl_data']->url );
die(); ?>
I also tried via javascript:
<script>
$(document).ready(function () {
window.setTimeout(function () {
location.href = $form->data['curl_data']->url; }, 5000);
});
</script>