Lesson info

Let's get an overview of events! In this video you'll learn what events are and how to create them.

Lesson transcript

In this video we’re going to have a closer look at events. As we said in one of the previous videos an event is any kind of information piece about an action a user may do at your website. For example a user clicks “download” text next to the ebook you offer, or a user fills in a contact form, or create an account on your site. An event may be also related to a background process, for example can be fired and saved in user.com app when an invoice has been sent to a user through your accounting system. Every time an event is performed, information about that is saved in the user.com app, along with the timestamp of occurrence.Let’s say a user clicks “Download” related to the ebook on my website. As I have added an additional line of code defining this event to my website source, the information about it is fired to the widget and noted in user.com. It is possible thanks to this piece of code here (so we see exactly the line that I added to my website source in the “body” part), through which information about that performed action is sent to the app. As you see, the fact of event occurrence has been added to the user’s timeline, along with its timestamp. In addition, you may add different types of attributes to a given event that is an amazing tool enabling you to gather valuable details. Thanks to it, user.com saves not only the fact that a given event has occurred but also additional information like e.g. the exact webpage from which an ebook was downloaded, the title of the ebook, the number of its pages and so on. As you can create an event for any virtual action your users may perform and there is a lot of flexibility, events are not predefined in the user.com app. So what exactly should one do to set an event up? The most important thing is to add a relevant piece of code to your website, which is responsible for communication with the widget. Then, when a given event is performed for the first time, its name will be automatically added to the Event’s list in the app. So You can see it by going to Settings -> App settings -> User data & events and Events. Here, for each event you have, you can add a short description like for example a note when exactly the event is triggered. It’s extremely helpful, especially when you have many events on the list and you need to quickly get a reminder on what a given event is about and related to. You can add descriptions manually here of course, but for advanced users we recommend adding descriptions through syntax. One useful tipp: as all events in filters are shown in alphabetical order, it’s good to have a logic behind naming strategy from the very beginning. It’s really important when a number of events grows up and one needs to be able to identify a particular one and understand how it works. This list is a kind of map that helps you navigate through different events active on your website. There are a few ways of creating an event. Important ones can be added directly in the source code of your website. You can as well use REST API it is useful especially for some particular types of events that require communication between applications, like for example an event “invoice has been paid”. And you can use Google Tag Manager. Another way of adding an event is using “Data collectors”. You can find them in the “Tools” section in the manu at the top. We’ll discuss data collectors in details in a separate video. And of course you can use third-party integrations like Zapier or Segment and track events related to other apps you use! The one thing to remember is that you don’t need to define ANYTHING about events in the user.com app. The most crucial is to add an event code to the source code of your website and once triggered, events name and its timestamp and, if specified, all additional event attributes will be saved in the app thanks to this code. Let’s now see what event attributes are about! So we want to create event with additional attributes for “ebook_download.” You can define them directly in the code along with their data types and after the event has been performed for the first time these attributes will be saved in the app in “Event attributes”. OR you can first go to “Event attributes” where you can as well specify their type like string, number, datetime and boolean, and then use these attributes in the code. If you create attributes with their data types in the app first, you don’t need to specify the type again in the code. But you need to be aware that if you skip the step of defining attributes and selecting their type in the app at first and you also won’t specify the attribute types in the code, we’ll save all your attributes as “string” values. Let’s say I want to track the ebook’s author name, title and number of pages. To enable user.com to track all the data I simply need to add a line of code to my website. So let’s have a quick look at the code itself - these 3 attributes, their types and values have been added. You can also do that through the Google Tag Manager. And now, after performing the event (so clicking download button), all event attributes values are saved in the app and visible on the user’s timeline. After performing this event for the first time the attributes and their data types have been saved in the system and if you want to use the same event attributes in other events, you don’t need to specify their data type in the code again. As long as the attribute values will be in correct format, so for example, a “number of pages” attribute will have the value “32” everything will work correctly. However, if for this attribute you send a value which is not a number like 2 words “thirty two” this value won’t be saved in the system as the attribute’s data type is number. Every time a user performs an event all details are saved in user.com and in the future you will be able to access history of all events and related attribute values for each user. Events are an amazing tool that lets you store detailed information about the actions your users perform and helps you to define communication strategies based on a bulk of various data pieces and customization. An extremely useful possibility at user.com is that you can include event attributes values in messages sent to your users! If you go to Tools -> Snippet tags you can see an example of abandoned cart recovery message whose content is dynamic and personalized for each user. Also, thanks to events, you may for example send emails to all users that downloaded your ebook exactly 5 minutes after they actually did it and refer to some of its details like its title or author. At user.com there is also another event type called “Product event”. Product events work in a bit different way than “Events” and we’ll discuss that in detail in the next video. As for now, we have covered different aspects of “Events”. Thanks for your time!

It's time for your company to grow.

Are you ready?

Free forever. No credit card required