- A merchant wants to measure conversion via an analytics tool.
- It's hard to find out when the payment form is actually sent, because tracking of "submit button pressed" is not sufficient as there's a validation in between that potentially stops listening to the event by default.
The script will listen to the 'form submit event' and execute the code - if there are no validation errors - right before the form gets submitted.
Let’s walk through the steps
Simply execute step number 1 'Generate a token for payment' as it is described in the Integration Guide.
Build the payment form and let the shopper pay - it is at this step where the script will execute.
- Add the script within the onAfterSubmit functionality of the COPYandPAY Options & API
After the payment is done, proceed to step 3 as it is described in the Integration Guide.