How can I integrate the contact form suggestions?
The module is linked to the existing contact form on the website. The following steps are necessary for this:
javascript<!-- Integration Userlike contact form suggestions, insert into form --> <div id="userlike-contact-container" data-userlike-contact-account="https://XXXXX-XXXXX.userlike-automation.com" data-userlike-contact-api-key="XXXXXXXXXXXXXXXXXXX"> </div> <script async src="https://XXXXX-XXXXX.userlike-automation.com/contact/contact.min.js"></script>
(This is just an example code, you will find your specific snippet within the Form Suggest section of the AI Automation Hub)
If the contact form suggestions are linked within a form, the text field is automatically analyzed.
Further options
If no form is used, or if additional/other fields are to be analyzed, these can be made known via fields using CSS selectors.
javascript<!-- Integration Userlike contact form suggestions, insert into form --> <div id="userlike-contact-container" data-userlike-contact-account="https://XXXXX-XXXXX.userlike-automation.com" data-userlike-contact-api-key="XXXXXXXXXXXXXXXXXXXXXX" data-userlike-contact-analyze="###INPUT_FIELD###" data-userlike-contact-submit="###SUBMIT_BUTTON###"> </div> <script async src="https://8467-25113.userlike-automation.com/contact/contact.min.js"> </script>
(This is just an example code, you will find your specific snippet within the Form Suggest section of the AI Automation Hub)
INPUT_FIELD: CSS selector of the fields to be analyzed. Example: '.input-field';
Default: '.userlike-analyze'
SUBMIT_BUTTON: CSS selector of the submit button. Example: 'form input[type=submit]'
Default: '.userlike-submit'
Validation / Tracking
If the form content is validated via Javascript, the submit must be called up manually if successful.
javascriptwindow.UserlikeContact.submit();