There are multiple ways to install the Unify Intent client depending on your
setup. When installing the client into the web application for your product,
using either the JavaScript client or the React client is recommended.
React library
Install the client in your React web application for a more native
integration.
JavaScript library
Install the client in your non-React frontend application, such as a Single
Page App (SPA).
You should only use one installation method per website or application. If the
client is installed twice on the same site, it may not work correctly.
By default, the React library will not automatically collect any events. You
can enable automatic event collection when initializing the client. See the
full Usage guide for more details.
Page events record a page visit. Typically, the easiest strategy is to
enable automatic collection of page visits, but you can also call them
manually.
// Enable automatic "page" event collectionunify.startAutoPage();// Send a "page" eventunify.page();
Custom events record specific actions taken by a visitor, such as button
clicks or form fills. You can send custom events with arbitrary
properties anywhere in your React application.
// Send a basic custom eventunify.track("See More Button Clicked");// Send a custom event with additional propertiesunify.track("Modal Opened", { modalName: "Contact Sales Modal"});
Identify events link a visitor to a specific company or person. You can send
identify events whenever you have information about a visitor, such as their
name or email address.
// Send a basic "identify" eventunify.identify("user@email.com");// Send an "identify" event with additional company or person attributesunify.identify("first.last@acme.com", { person: { email: "first.last@acme.com", first_name: "First", last_name: "Last", }, company: { domain: "acme.com", name: "Acme Corp.", }});
By default, the JavaScript library will not automatically collect any
events. You can enable automatic event collection when initializing the
client. See the full Usage guide
for more details.
Page events record a page visit. Typically, the easiest strategy is to
enable automatic collection of page visits, but you can also call them
manually.
// Enable automatic "page" event collectionunify.startAutoPage();// Send a "page" eventunify.page();
Custom events record specific actions taken by a visitor, such as button
clicks or form fills. You can send custom events with arbitrary
properties anywhere in your web application.
// Send a basic custom eventunify.track("See More Button Clicked");// Send a custom event with additional propertiesunify.track("Modal Opened", { modalName: "Contact Sales Modal"});
Identify events link a visitor to a specific company or person. You can send
identify events whenever you have information about a visitor, such as their
name or email address.
// Send a basic "identify" eventunify.identify("user@email.com");// Send an "identify" event with additional company or person attributesunify.identify("first.last@acme.com", { person: { email: "first.last@acme.com", first_name: "First", last_name: "Last", }, company: { domain: "acme.com", name: "Acme Corp.", }});