This article steps through setting up Text Search, which allows filtering of user sessions based on specific text strings, either through a Text Seen condition or by using a predefined text string search.
Predefined text string search can be used for searches that you want to track over long periods of time. Text search as a Text Seen condition can be used for ad-hoc searches.
Before you begin
- More than 50% unmasked Session replay sampling rate is needed to use Text Search.
- The relevant text to be identified should not be subject to Session Replay masking.
- Text contained in an iframe is not supported, including when the iframe contains the Contentsquare tag.
- A search for numbers or special characters requires a predefined text string search to be used.
- Predefined text strings containing numbers or special characters begin tracking from their creation date.
- Predefined text strings containing no numbers or special characters are tracked retroactively.
- You can search for a text string for up to 31 days, with up to 4 text seen conditions in the Analysis Context.
- We recommend you keep text strings searches to around 10 words to avoid time-outs.
Setting up Text Search as a Text Seen condition
Sampling is applied when segmenting by Text Seen
To optimize performance, sampling is applied when you segment by Text Seen, limiting sessions analyzed to 50%. You may notice the impact of sampling on data, for example when analyzing a particular day across two different time periods. The larger timeframe you analyze (typically above 7 days), the more likely you are to experience the impacted number of pageviews analyzed.
- Open Analysis Context and select the condition tab.
-
Click the condition dropdown, then select Text Seen.
Text Seen is inside the User Actions panel or can be search for.
-
Define the Text Seen condition visibility and page options.
Visibility options include whether users have seen or have not seen.
Page options include any page or a specific page or page group.
-
Use the Select Text dropdown to choose an existing text or provide a new text.
Text Search as a Text Seen condition is not case sensitive.
-
Click Apply.
Text seen conditions can also be saved as segments.
Setting up a predefined text search
- In the sidebar menu, click Analysis setup.
- Select the Predefined text strings tab.
- Click New text string.
-
Enter the text string to be saved and tracked, then click Create.
Predefined text strings are case sensitive and not normalized, meaning if you include a space by mistake then the space will be taken into account in the search results.
Troubleshooting FAQs for Text Search
Why does my text search data sometimes not appear for certain dates?
When creating or modifying a predefined text search, it changes how the system collects and indexes text data. To ensure system stability, a search cannot span before and after the date you set up or changed a predefined text search. This includes creation, modification, or deletion date of a predefined text search.
For example, if you created a predefined text search on August 7, searching from August 5-10 won’t return complete data as this range crosses over the creation date.
Workarounds:
- During analysis, use date ranges that are entirely before or entirely after, the date you created or changed a predefined text search. For example, if you created a predefined text search on August 7, use August 1 - August 6 or August 7 - August 15, but not August 5 - August 10 (this spans the creation date).
- Run separate searches: one for before the date the predefined text search was created or changed (using Text Seen), and another for after that date (using predefined text search), then combine the results.
- If you think you’ll search for something regularly, set it up as a predefined text search from the start.
I searched for text that I know was seen, how come I'm seeing no results?
Depending on the HTML structure of your website's content, it might be that your single text string is being treated and searched for as multiple, separate text strings in Contentsquare.
This can happen if the piece of text you search for contains multiple <span> HTML elements on your website, causing Contentsquare to search for each element as if it were separate pieces of unrelated text.
For example, you search for text "Oops! Discount code is not available", however it contains two <span> HTML elements:
1.<span>Oops! </span>
2.<span>Discount code is not available</span>
To avoid this, we recommend you:
- Make sure your text contains at most one
<span>HTML element on your website. - Use shorter text: if one text contains multiple
<span>HTML elements, you can search each<span>HTML element as one text, so that you can get relevant results.