Complete url problem

Description of the problem: I want to redirect participants to 2 different URLs - one a complete URL for prolific and one just a fake one when they don’t consent or don’t answer correct some questions.

I added $url variable in the setting in the completion code and this code but it is not working. I would love some help! thank you!

if understood:
    money_sum = round(money,2)
    if expInfo['language'] == 'hebrew':
        finalTextH = 'תודה רבה על הזמן שהקדשת לניסוי! \n\n זכית ב-'+str(money_sum) +' שקלים'
    elif expInfo['language'] == 'english':
        finalTextE = "Thank you for participating! \n\n You won $" + str(money_sum)
        url = "https://app.prolific.co/submissions/complete?cc=41464CAF"
else:  # not understood -> meaing the practice questions were to answered correctly too many times 
    if expInfo['language'] == 'hebrew':
        finalTextH = 'יותר מידי תשובות לא נכונות. \n\n תודה על ההשתתפות'
    elif expInfo['language'] == 'english':
        finalTextE = 'Too many wrong answers. \n\n Thank you for participating!' 
        url = "https://www.prolific.co/"

Check my crib sheet for this (I’m in my phone)

You have to redirect the url in code having set it to a placeholder in the Settings.