Skip to content

Install

Pop-up

The Smiley Digital Pop-up is inserted on a web page by adding the JavaScript code to the end of the <body> section of the HTML page. If this is not possible, the snippet can be added to the <head> section. This process is very similar to that of other tools, such as Google Analytics.

The snippet should look something like this:

<script
  type="text/javascript"
  src="https://feedback.happy-or-not.com/v1/bootloader/[survey token]/bootloaderjs/?lang=en-GB&init=true"
></script>

Enter your Smiley Digital token and the standard locale code appropriate for your website. If you have pages in different languages, you can use snippets with different languages or replace the locale abbreviation with a reference to a JavaScript variable. Your designated HappyOrNot admin user needs to configure the Survey questions accordingly to translate all necessary languages.

The locale name is in the format [language]-[country] and the language and country codes are two-letter codes from the ISO 639 standard. Language is lowercase, country is uppercase. Learn more on the format in RFC 3066.


Embed

The Smiley Digital Embed is inserted on a web page by adding the shorter JavaScript code to the exact place in the HTML code (<body>) where desired placement is preferred and the longer JavaScript code to the end of the <body> section of the HTML page.

The copyable snippet is provided in the Admin and may look like this:

<script type="text/javascript" src="https://feedback.happy-or-not.com/v1/bootloader/[token]/bootloaderjs/?lang=fi-FI&init=false"></script>
<script type="text/javascript">
  window.HappyOrNot.init({
    token: "token",
    embedTo: document.getElementById('dom-target')
  });
</script>

Enter your Smiley Digital token and the standard locale code appropriate for your website. If you have pages in different languages, you can use snippets with different languages or replace the locale abbreviation with a reference to a JavaScript variable. Your designated HappyOrNot admin user needs to configure the Survey questions accordingly to translate all necessary languages.

The locale name is in the format [language]-[country] and the language and country codes are two-letter codes from the ISO 639 standard. Language is lowercase, country is uppercase. Learn more on the format in RFC 3066.