User entitiesΒΆ

So now we know about web components and the type of events each component generates.

The next step is understanding the so called user entities.

Basically this means the following:

  1. A user arrives at the website.
  2. This triggers a sessions
  3. In which the user does several events.

User

A user is the identified cookie that visits the website. We can identify a user by a unique ID, the userID we save in our harvest_user cookie.

Everytime a user interacts with a component on the website. It triggers an event, during the processing of this event, we will look for the userID in the harvest_user cookie. If this does not exist, we will create a new cookie and userID. This ID is attached to the event, so we can link multiple events of the same user.

A user cookie expires after 2 years of inactivity. So when a user comes back 3 years after their last visit, we are not able to link the event to the same user.

More technical information can be found in the user management documentation.

Session

Just understanding which events a user has done is not enough.

Just as with visiting a store, it is interesting to know how many times a user has visited our store. In online marketing terminology we call this a session.

A session is basically a grouping of events in a short period of time.

Sessions are really important, because when we know why the user started a session, we can attribute all the events and conversions to the reason why the user visited the website.

An example is that we just a banner on a news site to try and convince a user to visit our website. Of course, these banners cost money, so we would like to know whether a user bought something during the visit that was a result of the banner.

We then can do things like:

How many sessions originated from our marketing campaign? How many sales were done? What is our return on investment for our marketing campaign?

A session is identified by a sessionID that is stored in the harvest_session cookie. When an event occurs, just as with the userID, we will try and find the sessionID in the harvest_session cookie. If we cannot find one, we create it. Every event has a sessionID associated with it.

A session expires after 30 minutes of inactivity or when a user comes from a new marketing campaign. When the session has expired, a new event will be linked to a new session.

More technical information can be found in the user management documentation.

Event

An event is the current interaction. The event contains all information about what happened. An example of an event can be:

  • A user views a page (pageview)
  • A user clicks on a product in a product list (click)
  • A user views a promotion about a certain discount on the homepage (contentview)
  • A user proceeds to the cart page (funnelstepview)
  • A user completes a purchase (funnelstepview)
  • A user interacts with a video player (dataview)

Each event gets an eventID. This makes it possible to find a specific event in your data when you need it for debugging purposes.