Hi galbriner,
there are several options to add JavaScripts snippets and make them available on every page:
- Put your JavaScript code in a separate .js file and add this file to the assets folder. You can then link the file via the common HTML <script> tag in the head.ftl file of your skin. (This will include your script in the HTML <head> section of the DOM.)
- You can use a component called last_chance_html.ftl, which will be added at the end of the DOM on every page. Here you can include your JavaScript also via the <script> tag and a .js file or write the code in the component directly, using Lihtium's <@liaAddScript> directive.
I would recommend using an endpoint which will fetch the information from the external system and build the response, e.g. the HTML code of your iFrame. With this your community user can authenticate via SSO and you can send user data (e.g. mail) as a parameter to your endpoint and finally to your external service to fetch personalised data.
Regards,
Christian