English
English
Appearance
English
English
Appearance
The widget sends standard GA4 events to your shop's Google Analytics. From them GA4 counts how many orders started with a search, with no extra tool and no change to the shop.
| event | when | parameters |
|---|---|---|
search | the customer completes a search (Enter, click on a suggestion, opening a product) | search_term |
select_item | the customer opens a product from the results | search_term, item_list_name: "metty_search", items[] with item_id and item_name |
The widget does not load GA. If the page has gtag, it calls gtag('event', …); otherwise, if the page has a dataLayer (Google Tag Manager), it pushes the event there. Without either it sends nothing.
If Consent Mode reports analytics_storage: denied, the widget sends nothing. When the shop does not use Consent Mode, consent is handled by its own banner that loads GA.
item_id is the product ID from your feed. GA4 attributes a purchase to the search only when the purchase event carries the same item_id in items[], so check that the shop sends GA4 the same product ID as the feed.
search and select_item events show search and result-click volume.Item list name, metrics Items purchased and Item revenue. The metty_search row holds units and revenue of products the customer opened from search.search → select_item → add_to_cart → purchase show the search conversion rate.search: what customers do after searching.GA4 renames menu items from time to time; dimensions and metrics can also be found by searching their list.
If you do not want the events, add the analytics=0 parameter to the script tag:
<script type="module" src="https://widget.metty.eu/v1/metty.js?api=<PUBLIC_API_KEY>&analytics=0"></script>