- Log into your Web Forms account at https://lightbox.cordial.com.
- Toggle the snippet to ON by clicking the OFF button.
- Choose After Submit in the --Event Trigger-- dropdown menu.
- Leave the Include Box IDs CSV and Exclude Box IDs CSV input boxes empty so that the code snippet will run on all lightboxes.
Note: To limit form data capturing to certain lightboxes, you can enter specific lightbox IDs to exclude or include.
- Add this function to the script block
- Click Save ALL Snippets & Publish QA.
- Test your lightbox submissions and verify that everything is working as expected.
This code will first access the email address entered by the visitor in order to identify the contact within Cordial. It will then submit a custom lightbox_submitted event to Cordial with the following information:
- All data inputs from the lightbox.
- Information about the lightbox, such as lightbox name and ID.
- Location information such as city, state, country.
- Device and Browser information.
- How many pages were visited before submitting the form.
- First date the user accessed the site.