Install

It only takes a few minutes to install Onset widget on your website.

How to Install

To get the Widget to appear on your web app, simply copy and paste the snippet from your Onset dashboard. If you don't have access to the Onset admin dashboard, you can grab the JavaScript code here 👇 You will need to replace it manually PAGE_DOMAIN with the unique page domain of your Onset Page.

Page Domain Examples:

  • example.onset.io - Onset page domain

  • releases.example.com - Custom domain page

<script>
  window.onsetWidgetSettings = {
    triggerText: '🔔 What\'s New',
    page: 'PAGE_DOMAIN'
  };

  (function (e, t) {
    e.onsetWidget = {};
    e.onsetWidget.on = function () {
      (e.onsetWidget.$ = e.onsetWidget.$ || []).push(arguments);
    };
    var c = t.getElementsByTagName('script')[0],
    i = t.createElement('script');
    i.async = true;
    i.src = 'https://widget.onset.io/widget.js';
    c.parentNode.insertBefore(i, c);
  })(window, document);
</script>

Install With Google Tag Manager

Google Tag Manager (GTM) is a simple solution for managing tags and JavaScript snippets. You can easily add or remove snippets without requiring a developer to update any code.

Important:

  • You must have Google Tag Manager installed on your website.

  • You'll need permission to edit your website's Google Tag Manager configuration. If you're unsure who owns your Google Tag Manager account, check with the team or person who manages your website, SEO, or Marketing operations.

  1. From the "Tags" section of your GTM account, click "New" to create a new tag.

  2. Give your tag a name, like "Onset Widget", then edit the Tag configuration.

  3. Next, click "Custom HTML".

  4. Copy & Paste your Onset widget embed code.

  5. Click "Save" This will take you back to the tag configuration screen.

  6. Open the "Triggering" section, and choose the trigger for loading the widget.

  7. You can choose an existing trigger or create a new one with the "+" icon in the top right. Tip: For optimal user experience, we recommend choosing "Window Loaded", so your website loads as fast as possible.

  8. Finally, save your Tag by clicking "Save".

All that is left to do is to "Submit" the changes to your container for them to take effect. However, it is highly recommended to verify your work using "Preview" mode beforehand. 👌

Last updated