Documentation

get_custom_event_suggestions

Finds high-traffic elements on the store that are not yet tracked, and returns a suggested event name, a CSS selector and a ready-to-paste HTML snippet for each.

When to use it

The first step of any custom-event work. It reads real click volume, so its suggestions are things visitors actually use rather than things you assume they use.

Ask for it like this

You do not name the tool. These are questions that make an assistant reach for it:

What should I be tracking that I am not?

How to read the result

  • Each suggestion includes a data-cc-track snippet, so a merchant can add tracking with a theme attribute and no JavaScript.
  • The alternative is a rule, which needs no theme edit at all — see create_custom_event_rule.

Parameters

minClicks
numberdefault: 20
Minimum clicks for an element to qualify as a suggestion.
limit
numberdefault: 20
Maximum suggestions to return.

Shared parameters it accepts

Documented in full on the tool reference index.

Date window — defaults to the last 30 days.

dateFrom
stringdefault: 30 days ago
Start of the window, YYYY-MM-DD. Inclusive.
dateTo
stringdefault: today
End of the window, YYYY-MM-DD. Inclusive.

Every tool also accepts merchantId, which resolves from your connection. You never pass it.

What comes back

JSON. These are the top-level keys; date-scoped tools additionally carry a _meta block with the server date and the data coverage envelope.

suggestions
Per element: a slugified event name, the CSS selector, click volume, and a ready-to-paste HTML snippet.

Pairs with