You can create an HTML element on your Bubble page and past your Javascript code in there.
When ever you want access to the users data you can click on the Insert Dynamic Content button to get access to the Current User’s data
If your example you wanted to pass the user’s email to your Javascript function you would do something like.
user_email: Current User's email
You can similarly do the same for all the other user fields.
This link explains how to add HTML content to the header (Since you want to add Javascript make sure you use the script tag)
From what I recall though the best way to do it universally would be to create a Bubble plugin and put it in there
To do so you will need to open the Plugin editor of your newly created Bubble plugin…you will then see a Shared tab which has a place to enter the HTML Header (Make sure to add your Javascript within a script tag) and if I am not mistaken this HTML gets added to all your pages by default. Also remember to install the newly created Bubble plugin to your app.
Cheers!
EDIT: I just realized you can not have dynamic content added via in the Bubble plugin method…
I think you will need to use something along the lines of a “Reusable Header Element” to get what you are wanting…not sure though.