Last Updated:
The following will help you track searches of VA.gov of content, including but not limited to:
-
Type Ahead Search
-
Resources and Support Search
-
Find Forms Search
-
Yellow Ribbon Search
This specification tracks both the search itself and the clicking of search results.
On Search
|
Description of When To Use |
Data Layer Specification |
Dev Notes |
|---|---|---|
|
When the user has performed a search AND search results have been returned For type ahead search, this is implemented just prior to next page load when the user lands on /search |
JavaScript
|
Please be sure to push `undefined` for any variable that is not available from the system For all non-type ahead search, please push Boolean value Example of |
Type Ahead Search Specific - Other Search Products to Ignore
|
Description of When To Use |
Data Layer |
Dev Notes |
|---|---|---|
|
When the next page load for a typeahead search has occurred Exclusively used on type ahead search for the purpose of maintaining consistent metadata extraction while coping with the difficulty of the timing between when search is executed, next page load, and search result metadata is returned |
JavaScript
|
See above dev notes for consistencies |
On Search Results Click
|
Description/Screenshot of Interaction |
Data Layer |
Dev Notes |
|---|---|---|
|
When the user has clicked on a search result from the search results list |
JavaScript
|
The position number should reflect the position on the page, for example, if 10 results are returned and the first result is clicked, If introducing a search result type that is not a title, PDF, or CTA, please ask analytics team for what this value should populate with |
On Search Result Change
|
Description/Screenshot of Interaction |
Data Layer |
Dev Notes |
|---|---|---|
|
When the orientation of the way search results are presented is changed, either with filtering or sorting |
JavaScript
|
Pagination of search results is tracked using a separate taxonomy |
Help and feedback
-
Get help from the Platform Support Team in Slack.
-
Submit a feature idea to the Platform.