Use this library on your website to identify your Botamp contacts.
- Include the script in your HTML file
<script async src="https://cdn.botamp.com/botamp.js"></script>
- Initialize the library
botamp.load(PUBLIC_API_KEY)
Get your public API key on your settings page. 3. Identify the contact
botamp.identify([id], attributes)
- When
idis not provided and no contact id was saved before in the localStorage, the contact is created and it's id is saved in the localStorage. - When
idis not provided, and contact id saved in the localStorage, the corresponding contact is updated. - When id is provided, the corresponding contact is updated.