Change Button Links on click Based On User Account Tags

Hi there!
Here is what I am trying to accomplish:

On a custom HTML block, User click on a button ‘view pricing’

  • If user has Tag X associated with their customer account, the button takes them to URL 1

  • If user has Tag Y associated with their customer account, the button takes them to URL 2

  • If user has Tag Z associated with their customer account, the button takes them to URL 3

  • If user does NOT have any Tag and he is only a visitor, the button takes them to URL 4.

I have tried to write this piece of code, but seems to be not working at all!

Click Here

@KetanKumar . can you help me with this?
Thanks!

Hi @ShaneBond ,

Please change:

elseif => else if

it will work fine.