Data Points

What are data points and how do I define them?

Data points are reoccurring information within your website's content. If you're running a blog the data points could be the author's name and the publishing date. If you're running a small Woocommerce online shop with a handful of products the price of each product could be a data point.

When you define data points for your website via the SS360 control panel, the SS360 crawlers can pick up these data points while indexing your website and transform them into structured data to be displayed in your result snippets or to be turned into a sorting option across your search results.

When looking at today.com, for example, you can see that their Health&Wellness posts always show the author of the article and the publishing date below the headline. With the data point feature it's easy to extract this information from each article to generate a richer result snippet, making it possible for the user to easily see who wrote a specific result article or to sort the results by publishing date.

 

 

Global Data Points vs. Content Group Data Points

The easiest and most straightforward way to integrate data points into your search is to define them globally. Visit  "Indexing Control > Content Groups" in the SS360 control panel.

There you find in the top part of the page the global settings for data points.

Just hit the "Add Data Point" button to add your first global data point by filling out the template. Your settings may look something like this:

You can define text data points or numeric data points. Text data points are for displaying information within each search result, numeric data points can be used in the same way or they can be made into a sorting option (e.g. the publishing date, price, quantities, weight values, etc.).

The settings above are as follows:

  1. Name: define a name for the data point. This name will be shown left of the data point.
  2. XPath: you must enter a valid XPath expression to point the crawler to the element which contains the data point. Let's say you want to add an author filter. In this case, you would set "Name" to "Author" and then set the XPath to the DOM element containing the author's name. Every DOM element on your site described by this XPath will be analyzed and the information it contains will be extracted as a data point for this page. You may also point the crawler to numeric information, such as date, weight, or price. The SS360 crawler will automatically recognize that the data point is numeric and will extract the numeric value. This way you can define a data point as a sorting option, an example of which will be shown later.
  3. Show: this box should be selected if you want SS360 to display this data point in the search result, regardless of whether you want to show a text value or a numeric value.
  4. Single: the XPath you provide could match multiple nodes on the page. Select this box to only pick the content from the first node determined by the XPath (this box should be checked by default).
  5. Sort: check this box to let the engine generate a sorting option for this data point. This only makes sense if the data point holds a numeric value, otherwise sorting won't work.

Don't forget to hit the save button below the data point to save your configuration.

Important: you have to re-index your entire site to see the new data points.

 

More data points

Let's extend the example from before and add a numeric data point to display in the search results and to use as a sorting option.

As you can see, we added two new data points with the same XPath. The XPath points to the publishing date of each article on today.com:

The publishing date is found on every article in the top right corner directly below the headline. The XPath chosen here extracts it directly from a meta attribute, which is part of the schema.org definition.

SS360 extracts this date twice and uses it in two different ways:

  • In the first setting the XPath is used as a sorting option called "Publishing date".

    In this case, the three options are configured in the following way:

    • "Show" is deselected since we don't want the date to be displayed in the search result.
    • The option "Single" is selected because, as explained earlier, we only want to extract the first result this XPath expression is giving back.
    • "Sort" is selected since we want this data point to be a sorting option. When selected, you have the option to sort descending or ascending.
  • The second setting is configured to display the date directly under the "Author" data point in the search result.

    To achieve this, the three options are configured as follows:

    • "Show" is selected since the numeric value should be shown directly in the search result.
    • The "Single" option is still selected since this is only regarding extraction. We still want to get the data from the first node if multiple nodes are found with the XPath expression.
    • The "Sort" option is deselected.

By adding two data points that get their information from the same XPath expression from the same node you can create both a sorting option and a richer search snippet with additional information.

Below the data points we just defined you will see the option "Default Sorting". You now may choose to select your new numeric data point "Publishing date" as a default sorting option to show the newest article first in the search results.

 

When does it make sense to deselect the "Single" option?

If you have multiple values you want to show within each search result, you may define one XPath to extract all nodes relevant for this information and leave the "Single" option deselected. Let's look at an example on today.com when visiting the "Food" category. There you find many recipes for different dishes each with an ingredient list.

 

Content Group Data Points

Since only recipes have ingredient lists, it makes no sense to define the data point for ingredients globally as the XPath should only match pages within the food category. Because of this, we should define a content group. To learn how to do this you can refer to our content group tutorial.

After we have created the content group, we can add a data point exclusively for this content group.

 

Each data point consists of a name--"Ingredients" in this case--and an XPath pointing to the desired content--in this case, the ingredient list.

Please note the "Single" option is deselected in order to catch every ingredient.

When searching now for a recipe like "Z'paghetti Bolognese" we will find the ingredients listed directly in the search result:

This can be tuned as much as you want, using whatever data points you have on your site. You may even place hidden tables or other elements to hold data not visible to the user, but extractable by the crawler, which will then be included in the search results.

Don't forget to re-index your entire site to let the changes take effect.

 

Show Data Points in Search Suggestions

You can select which data points you want to show in your search suggestions and then reference them in your ss360Config under the suggestions.dataPoints parameter. For example, you want the data point 'Author' to be shown in your suggestions, with the word Author: in bold and the author's name next to it. You would configure this as follows:
Or, if you want to hide the data point name, simply remove it from the html so you have:

The name between the # symbols has to exactly match the data point name so it is replaced with its value. Let's take another example: you want to show the "Category" and "Price" with the $ sign before the amount. You would adjust your configuration as follows:

By default, the data points would be shown below the result title, position: 2 below position: 1, etc. To see it in action, start typing e.g. granola or any other food item into the search box on this search example page. In this case the "Calories" data point is displayed.

You can fine-tune the positioning of your data points by wrapping the them in custom HTML and applying some CSS. For example:

You can override the SS360 default stying by modifying the .unibox__extra class:

If you're using an older version of Site Search 360 (v10 and earlier), you have to apply the extraHtml parameter (now deprecated) instead of dataPoints. Here's how:

 

Data points and API usage

When you use the SS360 HTTP REST API you can send data points within each uploaded page.

Use the structuredData array to send the objects of the data point within each page. You have to place a JSON object for each data point into the array. The data point JSON object must define the name, such as "Author" or "Publishing Date", and the corresponding value for this page.

Anything still unclear? Please get in touch with us to help you via email (mail [at] sitesearch360.com), Gitter, or our chat widget on the main site.