Hello,
I’m not sure about this. I think it would be better to contact Yoast support to make sure that you use correct code in the correct place.
Regards