Before you start
Install the Octanist pixel on the page first:window.OCT.submitLeadForm, prevent automatic browser capture for that form with data-octa-ignore.
octa_sid, while preventing the same form from being captured twice.
Send a form submission
Usewindow.OCT.submitLeadForm(fields, options) after your form has successfully submitted.
true when Octanist accepted the payload for sending. It returns false when the payload is empty or invalid.
Supported options:
Octanist ignores sensitive fields such as passwords, captcha tokens, card fields, CSRF tokens, and
octa_sid. Field values are trimmed and long values are shortened.
AJAX example
For AJAX forms, send the form to your own endpoint first. Call Octanist only after the website knows the form was accepted.Read the session ID
Usewindow.OCT.getSessionId() when you need the browser session ID.
octa_sid.
Update consent manually
Usewindow.OCT.setConsent() when your consent banner has its own callback and Octanist cannot detect it automatically.
Set consent before OCT is ready
If your consent code can run before the pixel has finished loading, use one of these options. Set a global value before the pixel loads:Other OCT methods
Example debug snapshot:
Debugging
Usewindow.OCT.debug() for a quick browser console snapshot. For a fuller support report, use the Octanist Debugger.