How To: Add Header and Footer Scripts

Portal administrators can add header and footer scripts that will run on every page in the portal.

These scripts can be added or updated through Admin Settings page:

1. Navigate to the Admin Setting page

2. On the right-hand menu, click on “Header Footer Script Settings”

3. Enter in the script you wanted to run on the header on the first text field

4. Enter in the script you want to run on the footer on the second text field

5. Click on save to save the changes

Sample script used:

<script>
(function(f,i,r,e,s,h,l){i['GoogleAnalyticsObject']=s;f[s]=f[s]||function(){
(f[s].q=f[s].q||[]).push(arguments)},f[s].l=1*new Date();h=i.createElement(r),
l=i.getElementsByTagName(r)[0];h.async=1;h.src=e;l.parentNode.insertBefore(h,l)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXX-XX', 'yourdomain.com');
ga('send', 'pageview');
</script>

You can use browser’s dev tool (inspect element) to verify whether the scripts were added accordingly.

Â