Skip to content
QwryAI
Documentation
Pages

Widgets

Click Tracking

See how often visitors use the buttons, links and fields in your Widgets, and each one's interaction rate.

Add a trackingId to an element in your Widget's code, and QwryAI counts how often visitors see it and use it. You don't need any code on your website. The counts and the rate appear in Analytics › Widgets.

jsx
<Card>
  <Col gap={3}>
    <Title value="Where's my order?" />
    <Button label="Track package" trackingId="Track package" onClickAction={{ functionName: "openTrackingLink" }} />
    <Button label="Contact support" trackingId="Contact support" variant="outline" onClickAction={{ functionName: "contactSupport" }} />
  </Col>
</Card>

The trackingId is also the element's label in analytics, so give each one a short name a person can read.

Add a trackingId

In the code editor, add trackingId to any element you want to track.

trackingId on each button in the code.

With the AI Widget Builder, ask for it in your own words, for example "track clicks on both buttons". The builder adds trackingIds only when you ask.

The AI Builder confirms the tracking it added.

Rules

  • The value is plain text, such as trackingId="Track package".
  • The value can't be empty and can be up to 100 characters.
  • Elements that share a trackingId count as one element. Use this for items drawn from a list, for example trackingId="Product card" on every card.
  • Renaming a trackingId starts a new row in analytics. The old name keeps its history.

Supported elements

Every element accepts a trackingId. What counts as an interaction depends on the element:

ElementWhat counts as an interaction
ButtonA click
Image, ListViewItem and other elements with an onClickActionA click
FormA submit
Input, TextareaChanging its text
Select, RadioGroup, DatePickerChoosing a value
CheckboxChecking or unchecking it
MarkdownA click on a link inside it

On a layout element such as a Col, a click on anything inside it counts as an interaction with it. Focusing or hovering an element is never counted.

What Gets Counted

Each time your agent shows a Widget in a conversation is one appearance. For each tracked element in that appearance, QwryAI counts:

  • Impressions: 1 if the element was shown. An element inside a state that never became visible, or an empty list, gets no impression.
  • Interactions: 1 if the visitor used the element at least once. Clicking a button five times in the same appearance still counts once.

The Rate is interactions divided by impressions, per day the Widget appeared, so each day's rate stays between 0% and 100%.

Find the results under Analytics › Widgets. Each Widget's row shows its Appearances, and its tracked elements are listed under it with their Impressions, Interactions and Rate.

Analytics › Widgets, before any Widget has appeared.

Next steps

Explore the documentation