Need an additional action after a campaign event, such as a successful form submission? Event code can connect that moment to a custom integration.
Open events
Choose More -> JavaScript events and review the available events.
Select the event that matches the task. Clicking Submit and successfully submitting a form are different moments.
Add event-specific code
Use code prepared for this campaign and its available event context. The person implementing it should verify the actual values provided.
For a simple screen or URL transition, button actions are usually enough.
Account for repeated events
Customers may reopen the campaign or visit several screens. Any action that writes data or sends an external event should handle those repetitions.
Do not count each click as a new contact. Confirm successful collection from the submission result.
Test success and failure
Try correct and incorrect data, reopening and phone use. Preview can simulate parts of the journey, so verify the external integration separately in the store.
Check the destination service's rules before sending personal data or identifiers. If reporting a problem, include the chosen event, expected outcome and action that caused the error.
A test that sends no data
Select beforePopupDisplay.js and enter only the function body:
console.info("DropUI demo: beforePopupDisplay");
Save, open the preview and check the browser console. This line appears when the campaign is displayed. It sends nothing and reads no customer data. Do not add a function(event) wrapper; the editor provides it.

