Custom script integration

Installation guide for custom script. Doesn't matter what platform you use!


UserEngage plugins work by injecting a script to your website which enables communication between your site and our API. If you don’t want a plugin you can integrate UserEngage by yourself. To do so, insert the following code before the closing <body> tag of your website:

For users that are logged off (no email address provided)

<script data-cfasync="false" type="text/javascript">
  window.civchat = {
    apiKey: 'YOUR_API_KEY',
  };
</script>
<script data-cfasync="false" type="text/javascript" src="https://widget.userengage.com/widget.js"></script>

And code for users that are logged in

<script data-cfasync="false" type="text/javascript">
  window.civchat = {
    apiKey: 'YOUR_API_KEY',
    name: "John Doe",
    user_id: "idfromyourdatabase",
    email: "[email protected]",
    gender: 2,
    status: 2,
    date_attr: "2017-07-25T14:14:08.612Z",   // Must be a valid ISO 8601 format
    phone_number: "+44754123434", // Must be a valid E.164 format
    score: 0,
    company: {
      name: "My Company",
      company_id: "idfromyourdatabase",
      revenue: "$239.9 billion",
      employees: 32
    }
  };
</script>
<script data-cfasync="false" type="text/javascript" src="https://widget.userengage.com/widget.js"></script>

After placing the following code in your website, replace the above information in bold with your information. You will receive the API Key once you have created an account.


If you have problems with inserting the code into your website, feel free to contact us, we will be more than happy to help you.

Big Cartel logo
Your API KEY can be found here:
Get my api key

Ready to try UserEngage?

Sign up to start a 14-day free trial.

Start free trial
CTA Men