Notifly
  • Welcome
  • Admin dashboard
    • Overview
    • Notification settings page
    • In-app settings
    • Template variables
    • Notification bundling
  • Widget
    • Introduction
    • Installation
      • Single page applications
      • Static pages (HTML)
    • Authentication
  • Notifly API
    • API Reference
    • Authentication
    • Response codes
    • User
    • Notification
Powered by GitBook
On this page

Was this helpful?

  1. Widget
  2. Installation

Static pages (HTML)

If your website is static HTML or otherwise doesn't render the HTML with Javascript – simply copy and paste the following snippet into all pages you want Notifly to appear on. It should be placed right before the </body> tag:

<script>
(function(){
  w=window;n=w.Notifly=function(){n.q.push(arguments)};n.q=[];
  d=document;s=d.createElement("script");s.src="https://app.notifly.io/static/v2/notifly.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);
})();
window.Notifly('init', {
  appId: "<YOUR_NOTIFLY_APP_ID>",
  authCode: "<USERS_NOTIFLY_HASH>",
  elementId: "<ELEMENT_ID_FOR_WIDGET_TO_ATTACH_ONTO>",
  externalId: "<EXTERNAL_USER_ID>"
});
</script>

This will render the Notifly icon as soon as the script has been loaded.

PreviousSingle page applicationsNextAuthentication

Last updated 5 years ago

Was this helpful?