Last updated: Nov 06 2017

Area: Episerver Perform, Episerver Reach Applies to versions: 1.0 and higher (JavaScript API)

Search results page tracking request

The search results page is tracked by providing the search term used and the reference codes of the products returned.

Note: Ensure the reference codes match the codes supplied in the catalog feed.

NameDescriptionUsage
searchResults    
     

term

The search term used

 

[string]

 

results

A list of product codes

An array of elements containing a refCode property that indicates the reference codes of the products returned by the search term.

A search page is tracked using the following script.

{
	"type"          : "searchresults",
	"lang"          : "en-gb",
	"searchResults" : {
		"term"    : "hello",
		"results" : [
			{ "refCode" : "RC1"},
			{ "refCode" : "RC2"}
		]
       }
} 

A zero search page (that is, one with no results) is tracked using the following script.

{
	"type"          : "searchresults",
	"lang"          : "en-gb",
	"searchResults" : {
		"term"    : "hello",
		"results" : []
       }
} 

Comments