Skip to main content
Fires when a visitor performs a search. This helps understand what customers are looking for and can inform product decisions and SEO strategy.
Shopify: Automatically tracked when using Shopify’s native search functionality.

JavaScript

window._upstack('track', 'search', {
  searchTerm: 'blue running shoes',
  resultsCount: 24
});
With search results:
window._upstack('track', 'search', {
  searchTerm: 'blue running shoes',
  resultsCount: 24,
  items: [
    { id: 'SKU_001', name: 'Blue Running Shoes', price: 89.99 },
    { id: 'SKU_002', name: 'Navy Training Shoes', price: 79.99 }
  ]
});

Properties

PropertyTypeRequiredDescription
searchTermstringYesThe search query entered
resultsCountnumberNoNumber of results returned
itemsarrayNoTop products in search results

When to Fire

  • Search results page load
  • Predictive search dropdown display
  • “No results” page (with resultsCount: 0)