For Affiliates

Tracking & Attribution

How the widget tracks impressions, searches, clicks, and referral attribution.

3 min read

The widget automatically tracks usage events for analytics and referral attribution. No additional setup is required.

#How Attribution Works

Every widget interaction is associated with your affiliate API key and affiliate ID. When a visitor clicks through to Exlitem from your widget, a ?ref= parameter is appended to the URL, linking the visit to your affiliate account.

This attribution persists through the visitor's session on Exlitem, so if they later purchase credits or contact an expert, the referral is credited to you.

#Affiliate ID

The affiliate-id attribute links tracking events to your specific affiliate account:

<exlitem-search
  api-key="YOUR_KEY"
  affiliate-id="YOUR_AFFILIATE_ID"
></exlitem-search>

Your affiliate ID is included in the embed snippet generated from the admin panel. It is sent with all tracking events so your analytics dashboard shows accurate attribution data.

#Event Types

The widget tracks four types of events:

#Impression

Fired once when the widget loads on a page. Counts how many times your widget was displayed to visitors.

Fired when a visitor submits a search query. Includes the search term and the number of results returned.

#Click

Fired when a visitor clicks on an expert result card. Includes the expert's identifier and the position in the result list.

#CTA Click

Fired when a visitor clicks the "View all results" call-to-action link at the bottom of the results. This navigates them to the full Exlitem search page.

#How Events Are Sent

Events are batched and sent in the background to minimize impact on page performance:

  • Events are queued in memory as they occur
  • The queue is flushed every 30 seconds
  • Events are also flushed when the user navigates away (using the visibilitychange event)
  • Failed sends are silently dropped — they don't affect the user experience

Events are sent as a POST request with your API key in the X-Exlitem-Key header. No cookies or local storage are used by the tracking system.

#Referral URLs

When visitors click through to Exlitem, the widget appends your API key as a referral parameter:

https://exlitem.com/expert/abc-123?ref=exl_pub_live_your_key

This parameter is used for:

  • Attribution — linking the visit to your affiliate account
  • Analytics — tracking which affiliates drive the most traffic
  • Commission — calculating referral-based earnings (if applicable to your tier)

#Viewing Your Analytics

Your account administrator can view your usage statistics in the admin dashboard, including:

  • Total impressions, searches, clicks, and CTA clicks
  • Click-through rate (CTR)
  • Daily usage breakdown with charts
  • 7-day, 30-day, and 90-day views

A self-service affiliate analytics dashboard is planned for a future release.