Segmenting your analytics data
On this page
Although Algolia’s out-of-the-box analytics offer meaningful information, it’s important to remember that searches to your site have a variety of sources: different countries, different platforms, different languages, etc. These unique sources contain valuable information that can be lost when your analytics data is aggregated across all your users.
To view analytics data for subsets of your searches, you need to assign category labels to your users’ searches. You can assign these labels through the
analyticsTags search parameter. You need to pass analytics tags with a user’s query at search time. They let you separate your search data into subsets. Viewing these segmented analytics can help clarify user behavior and the effectiveness of your search implementation.
Why you should segment your data
Suppose you go to the Analytics section of the dashboard and see that your No results rate is 20%. This is higher than you want it to be: one in five searches performed on your site returns no results.
Because this isn’t dramatically high, you assume something is wrong with your index configuration. But the underlying cause of your high no results rate could be something else. For example, it could be that every search users make on your mobile site returns no results and mobile searches consist of 20% of searches made to your application.
Your analytics data as a whole tell you that your no results rate is slightly bad. While this is true, what’s causing your low, no results rate isn’t a small error in your implementation. It’s a big error that impacts a relatively small subset of your users. Without segmenting your analytics data this cause isn’t immediately clear. Parsing your analytics data into mobile users and non-mobile users lets you could draw meaningful conclusions more quickly: your mobile search implementation needs attention.
In this case, you might be able to find the issue by looking through no result searches, or that you would catch a significant error in testing. Although this is true, you could identify the issue more easily using segmented data. The key takeaway is that aggregated data can hide outliers and obscure meaningful information.
What are analytics tags?
Analytics tags are strings that you pass with your user’s queries that categorize and detail their searches. You can pass any string as an analytics tag, but you should pass the same tag for searches that share the same search environment. For example, you could pass the
mobile analytics tag for all searches that originate from mobile phones. You can also apply multiple analytics tags to any search.
What should you tag?
You should use analytics tags to group similar search environments.
To get you thinking about the potential use cases for Analytics Tags, consider the following variables:
- Mobile vs. desktop
- Data retrieved from a user’s account, for example age and gender
- First-time user vs. recurring user
- Search language
- Country of origin
When deciding on the variables you want to use as analytics tags, make sure you consider the following:
- Your analytics tag shouldn’t be overly specific. This leads to a small sample size and inconclusive data. For example, if you make analytics tags for every possible birth year, your data would be spread thin because there are too many possible values.
- You must be able to retrieve the information you are trying include as
analyticsTags. For example, if you want to use your user’s age as an analytics tag, your users must provide it in a way that is accessible at search time.
Implementing analytics tags
Once you find a variable you want to use for analytics tags, you have to conditionally assign this tag to searches. You should manage this in your application’s back end. For example, suppose you want to add analytics tags for searches in different languages.
Defining segmentation variables
Assume your site has a Pick your language dropdown that lets your user select the site’s language. You can use this element to assign a language analytics tag. For every search, pass the language tag related to the value your user has selected from the dropdown.
Viewing your segmented analytics data
You can view the analytics data associated with a certain tag by entering its name in the Tags input box of Analytics section of the dashboard. Note, for now you can’t input multiple tags.
Interpreting segmented analytics
Analytics data reveal problems, but don’t necessarily provide solutions. It’s important to carefully consider the implications of your analytics data. You should combine the data with user and software tests to ensure that your conclusions (and in turn your solutions) are sound.
Continuing the previous example, suppose you view your analytics data with the German language analytics tag applied. You notice that this user subset has a low conversion rate and hypothesize that the German translation of your catalog is bad. While this is a good guess, you can’t know if it’s correct until you talk to your users and actively check the quality of your translation. Testing helps ensure that the changes you apply to your search implementation address the problems revealed by your analytics data.