Example Code

A default example here, would auto-open about 15 seconds after loading, default skin, waiting 30 seconds for a response.

Using async and defer is a prudent choice. They are assumed to be present for every example, even if not explicitly shown.

<script async defer
  data-site="Unique Site Identifier"
  data-poll="Unique Poll Identifier"
  data-user="A Unique User Identifier, typically md5(user@example.com)"
  data-hmac="Base64 Encoded SHA256 of Site Secret, Site, Poll and User">
  </script>

Enable Auto-Open

If you want the poll to automatically open use data-auto="true".

<script
	data-site="" data-poll="" data-user="" data-hmac=""
	data-auto="true">
</script>

An Alternate Skin

An alternate skin can be selected by adding data-skin="$URL"

<script
	data-site="$S" data-user="$U" data-poll="$P" data-hmac="$H"
	data-skin="https://user-survey.com/css/skin/dark.css">
</script>

Change Timing

Timing can be changed with data-wait, data-wait-open and data-wait-shut. Values less than 1000 will be interpreted as seconds, values over 1000 will be interpreted as milliseconds. The wait-open value is only used for auto-open, manual open is immediate.

<script
	async defer
	data-site="$S" data-user="$U" data-poll="$P" data-hmac="$H"
	data-wait="30">
</script>

Here we wait for open and shut 30 seconds.

Script Options

- data-site="SITE_HASH"
- data-poll="POLL_HASH"
- data-user="USER_HASH"
- data-hmac="base64(sha256(secret + site + poll + user))"
- data-auto = true|false*
- data-skin="full-url-to-stylesheet"
- data-wait="s|ms"
- data-wait-open="s|ms"
- data-wait-shut="s|ms"

Using APIs | Via Email | Via Phone