In this article, you’ll learn:
Events in VWO
Any action performed by the visitor on the website or any web application is referred to as an Event. This can be a click on an offer banner, making a payment, scrolling down the page, etc. Each event is given a name and a set of properties to add more context to the event. These events are used for targeting visitors for your campaigns.
For example, To analyze visitors’ shopping behaviour on an eCommerce website, you can create an event to capture the cart additions and associate properties like “product ID”, “cart value”, etc., to capture additional context. Once you have this information, you can use this event to target visitors for your VWO campaigns.
How do Events work?
- You create an event in VWO Data360 and also define the event by adding properties.
- This event needs to be linked to your website, web app or mobile application to capture the event whenever it is triggered. It requires a custom code to be installed on your website and applied with the required variables to capture the event and any property associated with it. Once ready, VWO starts collecting the information corresponding to the event.
- The event can now be used to track visitor behaviour and target visitors for your campaigns.
Types of Events in VWO
In VWO, Events are of the following two types:
- STANDARD EVENTS: These are predefined events on the VWO platform and can be used in campaigns and metrics, such as Page scroll, Time spent on a page, etc.
- MY EVENTS (Custom Events): These are the ones that you can create and configure based on your specific business needs.
For example, a Product Manager at an eCommerce business may want to track all the cart additions and convert them into transactions. To make this possible, they need to attend to those visitors that abandon the cart. In such a scenario, they can create a custom event in the name "Abandon Cart" and configure it to be used in their campaign to target those visitors to accomplish the purchase.
- UNREGISTERED EVENTS: These are the events that are captured by VWO from your website but not found registered in VWO. At times, instead of creating an event on the VWO platform, you would use the custom code of an event and tweak it to become another to be tracked on your website. Sometimes, such unregistered events may also come into VWO from a third-party integration. In such cases, you may not be able to use the data of those events for any analysis or segmentation. But VWO captures such events and brings them to you, so you can choose to have them registered in VWO. If you’re passing an event to VWO that you have not created under MY EVENTS, VWO captures it and displays it under UNREGISTERED EVENTS.
NOTE: These events will continue to stay for 3 days or until registered.
Clicking on these events will reveal the following information:
Properties Displays the details pertaining to the event properties, such as the Data Type and API Name Sample Values Displays the latest five instances of the event that were captured from your website. This will help you decide whether to register the event or not
You can choose to save these events to VWO by clicking on the Register Event button at the top-right. This will allow you to configure the event properties and save them under MY EVENTS.NOTE: In case of passing a new property to an event that is already present under MY EVENTS, VWO will capture and display them under the Unregistered Properties section in the Properties tab of the corresponding event.
- ARCHIVED EVENTS: If you are no more using a custom event, you can clear up the space by archiving it. Such events appear under the ARCHIVED EVENTS section. The number of archived events will also be displayed along with the section name in parentheses.
Any existing campaign that has been using these archived events will continue to use them. These archived events will appear in the visitor segmentation section of the existing campaigns with an ‘ARCHIVED’ tag. However, these events will not be available for a new campaign or any existing campaign that hasn’t yet used them. To learn how to archive an event, click here.
Creating Events in VWO
Let’s say you want to create an event to capture the failed payments, which might be due to multiple reasons such as declined payment, visitor’s session ended, delayed response of your website’s server, etc. To know about this, you need to create an event capturing the failed payments and set up all the possible reasons as its properties. To do so, from the main menu panel, access Data360 > Events. Click +Create and enter the details in the following fields:
|Enter the name of the event
|Enter the endpoint name for your event.
NOTE: By default, this field gets populated based on the value you have entered in the Event Name field. However, you can modify it.
|Enter a description that defines your event
Under the Properties section, enter the details in the following fields that help you track those payment skips:
|Enter the name of the property that helps to identify a specific attribute of the event
|Select the type (Text, Number, or Boolean) for your event property
|Enter the endpoint name for your event property
NOTE: By default, this field gets populated based on the value you have entered in the Property field. However, you can modify it.
If you wish to add a description to the event property, use the Description field that can be accessed by clicking on the vertical ellipsis (⋮) > Configure. Once done, click Save.
Post configuring, click Create. The created custom event appears in the MY EVENTS section on the left.
Clicking on a custom event displays the details of the same, along with a custom code snippet. The code snippet is available for the web version (browser-based) and SDKs (for FullStack). These code snippets contain the placeholders for the property variables, which need to be applied in the respective places. This ensures that each time the event is triggered, it captures the variable data from your website and stores them in VWO. These variables differ with the type of code; hence you need to apply the variables correspondingly.
For server-side SDKs, by integrating the VWO server-side SDKs with your application, you can A/B test your applications on the server side. To integrate an SDK, you just need to install the SDK from the respective package manager and then import it into your application. Since backend applications can be written in different programming languages, we offer VWO SDKs in Node.js, Python, PHP, Java, .NET, Ruby, and Go languages. The custom event code is, therefore, also made available in all these languages.
Click on the Copy Code icon at the top-right corner of the code snippet box to copy the code. After initializing the VWO SDK and the corresponding variables into your code repository, use this code in your application to enable this custom event for pre-campaign segmentation.
ATTENTION: Deleting events isn't supported. Therefore it's important to exercise caution while specifying API names for the events, as modifications cannot be made at a later stage.
Managing Events in VWO
Once an event is created, you can modify or clone the same based on your need.
To do so, select the custom event that you wish to work on, click on the vertical ellipsis icon at the top-right, and perform the required action as follows:
- To Edit - Click on the Edit option, make the required changes, and click Save.
NOTE: The existing inputs in the API Name and the Default Type fields cannot be modified.
- To Clone - Click on the Clone option, enter the Event Name and the API Name, apply the required changes, and click Create.
The cloned event appears in the MY EVENTS section on the left.
- To Archive - Click on the Archive option, and in the archival confirmation popup that appears, click Archive. Now the archived event will be moved from the MY EVENTS section to the ARCHIVED EVENTS section. You can always review the properties of an archived event by clicking on it.
An archived event can be edited just like any custom event, cloned into a new custom event, or unarchived to be used again in your campaigns.
To unarchive, select the archived event, click on the vertical ellipsis icon that appears at the top-right, and select the Unarchive option. In the confirmation popup that appears, click on the Unarchive button. Now, the custom event will be moved from the ARCHIVED EVENTS section to MY EVENTS.
Using Events in VWO
Events can be used for targeting visitors in your VWO campaigns. Having created an event to capture the failed payments, you can use this event in your campaign to target those visitors that encountered payment failures so as to offer them an alternative payment method or even a special waiver to encourage them to accomplish the purchase.
Targeting Visitors Using Events in VWO
To apply events for pre-segmentation purposes in your campaigns, perform the following steps:
- For VWO Testing and VWO Personalize campaigns, go to Configuration > Audience and Traffic > Target Audience > Custom Segment.
- Now create a custom segment where you want to track all the visitors who performed the given action. In the first dropdown, select an event and click + where to define the property.
In the dropdown corresponding to where select an appropriate property. In the next dropdown, set the relation, and enter/select the required value correspondingly in the last field. To add more properties, click + and where.. to define them.
The following example highlights the targeting condition set for visitors who encounter payment failure.
- You can add more conditions by clicking Add another condition.
- Once done, click Save Segment to apply the targeting condition for your campaign.