Web1on1 Automotive Conversations

Your organization

Livechat Widget

Include in your website

The Livechat Widget script is controlled through the use of data attributes. The following data attributes are used in the examples below:

  • data-web1on1-appid (required)
  • data-web1on1-options
  • data-web1on1-callback

Method 1: static script tag (recommended)

We usually add some Javascript to a file by embeding it directly into a HTML file. Add the following code towards the end of the head section on your page.

Method 2: dynamically loaded script tag

In some cases, you may want to load (even dynamically generated) code within javascript. To write the widget script tags to the head of a document, add the following code at the end of the body section on your page.



Passing extra options

Using the data-web1on1-options attribute, we initialize the widget ourselves and can add some extra options. The widget on this page was created with the following code:



Call a function after loading

Using the data-web1on1-callback attribute we can provide the name of a global function that is called as soon as the widget has initialized itself and is loaded on the page.

In the example below, we send Google Analytics data back to Web1on1. By storing the GA client id in the user properties (keyed by tracking ID), it will be send to Web1on1 and added to other contact data.