How to create custom events in SalesViewer®
Custom events allow you to capture specific actions and interactions of visitors on your website that go beyond the standard tracking options. Here is a detailed guide on how to create and implement these custom events in SalesViewer®.
Steps to create custom events
To create custom events in SalesViewer® tracking, you can use the following format:
sve = window.sve || [];
sve.push(['EventType', {name:'Eventname'}]);
Definition of event type and name
- First, create or identify a trigger that should be linked with the above code to send a signal to your SalesViewer® account.
- Replace ‘EventTyp’ with the desired event type, which will act as a group.
- Replace ‘Eventname’ with the name of the custom event you want to track.
Choose a meaningful event type and name that clearly describe the event. This will simplify later analysis and reporting.
Example:
To create an event of type ‘purchase’ with the name ‘Completed Purchase’, use the following code:
sve = window.sve || [];
sve.push(['purchase', {name:'Completed Purchase'}]);
This example sends an event of type ‘purchase’ with the name ‘Completed Purchase’ to SalesViewer®.
Inserting the event into your JavaScript code
Place the custom event code at the location in your JavaScript code where the event should be triggered. This could be when a specific button is clicked or a form is submitted.
Testing and verifying
If you notice after a few days that the custom event has not been triggered, or if you feel it is not functioning correctly, feel free to contact us, and we will conduct a test for the event.
By following these steps, you can effectively create and implement custom events in SalesViewer® to track a wide range of interactions and actions on your website.