The Subscribe.js script is a hosted script that will be used, among other things, to display multiple authentication elements on your site (signin/signup buttons, ...).
In order to display Subscribe elements inside your page, it is important to add the necessary html content in which any of your elements will be added.
A Subscribe element can be added to any element in your page, and you can set any id or any class you want to the container, as long as you specify it later inside the .createAuthElement method:
The Subscribe.js SDK will handle the rest!

#Load the script

Once your html is ready to receive an element, you can add the Subscribe.js tag itself. Like any script out there, the Subscribe.js script can be loaded in a lot of different ways.

ℹ️ If you are using Content Security Policies on your site, make sure to add https://*.poool.fr (or the api and cdn subdomains if you are not comfortable with wildcards) and https://*.poool-subscribe.fr (or the assets subdomain) to your whitelist in order for the elements to operate normally.

While sync mode is easier to read and use, we recommend using async mode to avoid any unwanted side effects to your browser when the script is loading.

..And that's it! You should now be able to create any number of Subscribe elements wherever you want on your site.

We'll now go further and see how we can configure these elements to fit your needs.