Buskara
Help center

The events in your GTM/GA4

Mirroring search activity into the store's own analytics, with the table of events and the container ready to import.

4 min Updated 9 August 2026

From the Pro plan on, the search panel can mirror search activity into the store's own analytics. It's switched on in two places, and both are needed: the plan with the feature, and the "Send events to the store analytics (GTM / GA4)" switch on the store page. With either one off, the store's dataLayer stays exactly as it was.

Each event is delivered twice to the page itself, as a browser CustomEvent (buskara:search) and as a push to the dataLayer (buskara_search), and nothing leaves the page by itself: this path writes no cookies and loads no scripts. What goes on to GA4, and under which consent, is decided by your Tag Manager.

The events

Event When it fires Parameters
buskara_open the search panel opens none
buskara_search a search settles (not on every keystroke) search_term, results, search_id
buskara_result_click click on a result item_id, item_name, price, brand, index, search_term, search_id
buskara_add_to_cart an add to cart in a session that searched: the search button, the assistant, or the store's own button after a search item_id, item_name, price, brand, quantity, search_term, search_id
buskara_similar_open the similar products panel opens item_id, item_name, search_term, search_id
buskara_quiz_* each step of the assistant (start, answer, back, product_click, handoff, chat_message, checkout, …) type, slug, step + extras from the step

About buskara_search: the search panel waits for the typing to settle before emitting. Typing "headphones" produces a dozen intermediate searches and only the last one is what the person meant; GA has no way to retract an event that's already been sent.

Connecting it in three steps

  1. Download the ready-made GTM container in the panel and import it into Tag Manager: it brings the variables, the triggers and the GA4 tags already assembled. If you'd rather, follow the step by step here: Your store search in Google Analytics.
  2. Open the "Buskara - GA4 Measurement ID" variable and swap the placeholder for your Measurement ID (GA4: Admin → Data Streams).
  3. In Preview, run a search on the store and check the events arriving; then Submit.

Without Tag Manager, the CustomEvent serve the same purpose in a few lines:

document.addEventListener('buskara:search', function (e) {
  gtag('event', 'buskara_search', e.detail);
});

Three important notes

  • Zero is a value. A buskara_search report with results = 0 is the list of what visitors look for and don't find. It feeds buying decisions, synonyms and rules.
  • search_id crosses the two worlds. It's the same identifier the panel uses, which lets you check the GA numbers against the panel ones.
  • Consent is yours. The imported tags come with no consent state set; the gating is done in the rules of your own container, as with any other tag.

What about Microsoft Clarity

If the store already uses Microsoft Clarity, there's a second switch on the store page, "Send events to Microsoft Clarity", with a plan feature of its own (also from Pro on).

With it on, the search panel hands the same buskara_* events to whatever Clarity it finds on the page, and tags each session with two tags, buskara_search_term and buskara_item_name, which is what serves in there to filter recordings and heatmaps by what people searched for. Watching half a dozen recordings of sessions that searched a term and left without clicking is worth many reports.

Two notes: Clarity doesn't take parameters on events (that's the tool, not us), hence the tags; and the search panel never loads the Clarity script, so without it on the page the switch does nothing.

The two switches are independent: you can mirror only to GTM, only to Clarity, or to both.

Was this guide useful?

No, I still have questions