Avoca widgets
Forms, booking, funnels and a cookie banner for any website: a Chapong project or anything else. Add the script once per page, then one line per widget. Get ready-made snippets with your own form and calendar ids from your Chapong project under Settings → Widgets.
<script src="https://widgets.chapong.com/v1/widgets.js" async></script>
Widgets
| Widget | Markup | Where the data goes |
|---|---|---|
| Lead / contact form | <div data-avoca="form" data-id="FORM_ID"></div> | Your CRM, as a contact |
| Newsletter sign-up | A short form, data-height="260" | Your CRM |
| Booking calendar | <div data-avoca="booking" data-user="USERNAME" data-calendar="SLUG"></div> | Your calendar |
| Funnel | <div data-avoca="funnel" data-id="FUNNEL_ID"></div> | Your funnel’s form steps |
| Cookie consent | <div data-avoca="cookie-consent" data-policy-url="/privacy"></div> | Stays in the visitor’s browser |
Options
data-conversions="AW-123/abc"anddata-ga4="G-XXXX"on a form fire Google Ads / GA4 conversions on your page when it is sent.data-redirect="/thanks"on a form goes to a thank-you page after it is sent.data-heightsets the starting height; forms and booking resize to fit by themselves.data-titlesets the iframe’s accessible title.
Events
avoca:form-submittedon the widget element (bubbles) and anavocallab_form_submitdataLayer event. No field values are passed to your page.avoca:consenton the document and anavoca_cookie_consentdataLayer event; Google tags get a Consent Mode update.- Widgets added after the page loads are picked up automatically.
AvocaWidgets.scan()forces a scan.
Privacy
Forms and booking run in an iframe on avocolab.com, so visitors’ answers go straight to your account and are never readable by the page around them. The script sets no cookies; the cookie banner stores the visitor’s choice in their own browser.