Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
136
rated 0 times [  142] [ 6]  / answers: 1 / hits: 19734  / 11 Years ago, tue, january 28, 2014, 12:00:00

I need to use the on sent ok action hook for two actions 1) to track the email adress and 2) to send the user to a thank you page. I tried adding this into the 'Additional Settings' section on the Contact Form 7 panel but I am not sure if it works correctly. At least I got different results when using it with two different forms.



on_sent_ok: fnTransaction('Contacted', 'userid=' + [your-email]);

on_sent_ok: location.replace('http://xxxxx.com/thank-you');


Is it OK to use the action hook twice or can I combine this somehow? I'd appreciate your help!


More From » wordpress

 Answers
1

couldn't you just call location.replace('http://xxxxx.com/thank-you'); inside the fnTransaction()-function?



edit:



write a new function that combines both:



on_sent_ok: mySentOkFunction('Contacted', 'userid=' + [your-email]);

function mySentOkFunction(param1, param2){
fnTransaction(param1, param2);
location.replace('http://xxxxx.com/thank-you');
}

[#72900] Monday, January 27, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
albert

Total Points: 652
Total Questions: 105
Total Answers: 108

Location: Pitcairn Islands
Member since Fri, Oct 15, 2021
3 Years ago
;