« Back to front page

10 things you can do with Custom Snippets

Introducing our new Custom Snippets feature, including custom fields and custom counts! Save time and resources with accurate analysis and automated tasks. Check out all the things you can do with our new feature.

Imagine you need to change a single piece of information e.g. your address on your website. Do you know on how many of your pages this information can be found? And how do you make sure that you changed the address on every single page? Would you execute that task manually? Which - to be honest - would take you foreeeever. Absolutely not! There are better ways to use your precious time. Good news: We are here to help you solve that task in no time with our new feature Custom Snippets. 

How does the feature work?

Our Custom Snippets feature is divided into two main analysis choices Custom Fields and Custom Counter. 

Custom Fields is used for text-based queries such as names, words, and sentences. In our current example that query would help you determine on which pages you need to change the address. 

While Custom Counter is utilized for number-based outcomes, and following along with our example, would tell you the exact number of pages on which your address can be found. 

Your Benefits:

  • Gain transparency over your website's current status quo. 

  • Conduct extremely accurate analysis based on your own website’s data.

  • Tailor analyses to your specific needs and receive the data you really need. 

  • Automate tasks to work more efficiently and save time. 

  • Ensure that you never miss any important aspect during optimizations. 

  • Enjoy endless analysis possibilities. 

How to set up your own Custom Snippets?

Go to your “Project Settings”. Please note: To do so, you must be an Account Owner or Project Manager.

Click on “Custom snippets."

Choose an analysis option: Custom Fields or Custom Counter.

Following our use case from above on changing the address, we would opt for Custom Counter to find out on how many pages the Ryte address can be found. 

You can now name your Custom Counter, select a mode and add the selector. When creating a Custom Counter you can choose from four different mode options, while for Custom Fields you can select from six different mode options.

Regex: A regex, short form of regular expression, is a string of characters (e.g. text, words, sentences) that form a pattern and helps to find and match similar text, words or sentences. The mode options “Search in text” or “Search in HTML” indicate in which form the text should be searched for.

XPath: The XML Path Language is a query language to evaluate parts of an XML document. The mode options “Get text only” or “Get complete tag” indicate if you just want to copy the sole information (e.g. address) or the entire span-tag (<span>). 

CSS: CSS is a programming language which is used for the visual design of a website. The mode options “Get text only” or “Get complete tag” indicate if you just want to copy the sole information (e.g. address) or the entire span-tag (<span>). 

Let’s do three examples for Custom Counter:

1. Regex - Search in text

First, name your Custom Snippet. Choose a name that indicates all important information, so you will later easily be able to find the Custom Snippet. 

Second, choose your mode and add your selector.

For “Regex: Search in text” go to your website and copy the address. 

2. XPath - Get complete tag

Same as above, start with naming your Custom Snippet.

Second, choose your mode and add your selector. 

For “XPath: Get complete tag” go to your website and open the menu with a right click.

Select "Inspect" and find your address.

Right click on the address to open the menu, select “Copy” and click on “Copy XPath”.

Paste into the selector field. 


3. CSS path - Get text only

Same as above, start with naming your Custom Snippet.

Second, choose your mode and add your selector. 

For “CSS path: Get text only” go to your website and open the menu with a right click. 

Select "Inspect" and find your address. 

Right click on the address to open the menu, select “Copy” and click on “Copy selector”. Note: This is the process applied when using a  Chrome Browser. 

Paste into the selector field. 

4. More Custom Fields & Custom Counter examples

After saving your Custom Snippet you have to start a new crawl to see your results and work with them. After the initial crawl, the Custom Snippet will also be included in every consecutive analysis. In case of multiple projects, such as different country domains or a mobile and desktop version of your site, you need to create a Custom Snippet for every project. So far, you can create a maximum of 10 Custom Fields and 10 Custom Counters per project. 

To verify that your query finds results, you can perform a test run with the Test Selector before starting a new crawl.

How to work with the data?

After the first crawl, the Custom Snippet can be found as an attribute in the project’s Data Explorer. With this, endless analysis possibilities unfold. In our address use case, you could find out the exact number of pages on which you would have to update your address, as well as, which these pages are. Moreover, you could also test afterwards with a second crawl, if you have completely updated all to ensure you didn’t miss a page. 

10 more things to do with Custom Snippets

Custom Fields:

  • Where on your website does a specific name/word/sentence appear?

  • Is your brand name always written correctly across your website?

  • Is a product’s price the same on all product pages?

  • Get an overview on structured data or breadcrumbs e.g. On which navigation level are these pages linked? How many clicks does it take to get to a specific page?

  • And much more…

Custom Counter:

  • How frequently do individual rubrics occur (e.g. politics, sports, etc.)?

  • How many articles are written by a specific author? 

  • How many pages have images missing alt-tags? 

  • How often does a specific keyword appear on your website? 

  • How many articles are shorter than X words/ longer than X words?

  • How many category pages have less than three products displayed?

  • And much more…

Looking for a single piece of information on all your sites can feel like searching for a needle in a haystack. With our new feature Custom Snippets you can automate and speed up your analysis processes with just a few clicks, while simultaneously making sure that you won’t miss anything. Enjoy endless analysis possibilities directly tailored to your needs.

Ryte users gain +93% clicks after 1 year. Learn how!

Published on Nov 16, 2022 by Stefanie Kirschner