Adding a 3rd Party JS to all pages

Hi, my client sent me this code to be inserted in all pages so it can collect user data:

i tried already the HTML element but the it doesn’t work.
Is it possible to add this kind of code? and if so how can i add it?