Installation

You can automatically load and install the client by placing a <script> tag in the <head> or <body> of your HTML document. The minified script can be found in your Unify app here and comes pre-loaded with your public write key.

You should only initialize the client one time on your website.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <!-- Your Unify JavaScript tag here -->
</head>
<body>
  <!-- Or here... -->
</body>
</html>
The Website tag can also be installed with Google Tag Manager. Make sure to enable support for document.write.

When you include this tag in your HTML, you will immediately be able to access the client at window.unify (or simply unify since window is global).

Console
// Trigger a `page` event
window.unify.page();
unify.page();

// Trigger an `identify` event
window.unify.identify('user@email.com');
unify.identify('user@email.com');

Usage

When the Unify Intent Client is installed this way, by default it is configured to go to work automatically on your behalf. Most of the time, installing the <script> is all you will need to do to collect intent data on a static website. See Configuration for more details about how this works.