# Tracking events

The two main events collected by the platform are impression events and click events. These events are useful for measuring the performance indicators of sponsored product campaigns.

{% hint style="info" %}
If you are using the client-side integration mode, triggering the impression event is not necessary. It is automatically handled by the JavaScript library after the sponsored ads are loaded. In the case of a server-side integration, please follow the instructions below.
{% endhint %}

## Use of datas- \* attributes

To trigger the impression and click events, simply add the `data-vzbl-id` attribute to the HTML tag surrounding the sponsored ad blocks, with the value being the **tracking ID** of the ad returned by the API.

```javascript
<div data-vzbl-id="fa32460f-3593-430b-87b0-1a1c6098efb2">
```

HTML5 allows you to associate data directly with an HTML element using `data-*` attributes. This approach makes it easier to store data within the document, directly within the HTML elements.

The JavaScript library will automatically send the events to the **Veasybl** server.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veasybl.io/en/tracking-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
