Custom Element Extraction
Conductor Website Monitoring monitors all important SEO elements on your pages, such as title, meta description, canonical link, etc. With our Custom Element Extraction, you can define what additional elements you want to keep track of.
Example use cases
The beauty of custom element extraction lies in its flexibility - you can create any custom element you need. You can let your imagination run wild, or get some inspiration from these example use cases we have seen the most.
Author of the article
Does each of your pages have an author who is responsible for keeping it up-to-date? Set up a custom element Author, and then you can create a new segment for each author so that everyone knows which pages they need to keep their eye on.
Publication date
Are you trying to find out how many articles were published in a specific month on your website? Create a custom element for the publication date of each page and then easily filter on it on Pages to see how much content was produced in the past months.
Date of last update
Do you want to make sure that you don't have any outdated content on your website? Start tracking the date of last update on each page and then filter on it on Pages to find pages that need a little touch of freshness.
Out of stock products
Do you manage an e-commerce website and need to make sure that all products listed are in stock? Create a custom element for the Out of stock label and easily search for it on all pages.
Empty category pages
Do products listed on your website often change? Set up a custom element for No results in this category and quickly find empty categories that can be removed.
Most popular products
Are you curious which products have the highest review score? Create a custom element for products with five star score and then filter on it on Pages to search for the most popular products on your website.
Custom Element Extraction in Conductor Website Monitoring
Setting up custom elements is only the first step. More important is what you can do with them:
How to create a custom element
Not 100% sure how to set up a custom element? Go through this step-by-step guide to learn more.
Setting up a custom element
Setting up a custom element consists of these steps:
Choose an element name
Choose a name that describes the element the best, e.g. Author for the author of the article or Last updated for the date of last update of the page.
Define extraction steps
Define extraction steps using XPath, CSS selectors or regular expressions. At least one step is required, and you can define up to 6 extraction steps by clicking Add another step. Conductor Website Monitoring processes these steps sequentially in the order you defined, meaning the result of the first step serves as an input for the second step, and so on.
For each extraction step, choose:
Method
You can choose XPath, CSS selector, or a regular expression.
Expression
This is where you specify the expression of the selected method, e.g.
- XPath:
/html/body/p[1]
- CSS selector:
.user-overview__name > span
- Regular expression:
/([0-9])/
Conductor Website Monitoring uses PCRE to evaluate regular expressions. Check out this cheat sheet (opens in a new tab) to learn more about the required format.
Occurrence
Here you can specify which element on the page should be extracted if Conductor Website Monitoring finds more elements on the page that conform to the extraction expression. E.g. if a paragraph is about to be extracted, here you define whether you want to extract the first paragraph, second paragraph, etc.
If you leave the Occurrence set to All and won't use any transformation that requires it (see below), only the first occurrence of the element will be extracted.
More extraction steps
Combining XPath and CSS selectors is not supported. If you want to use one of these methods for extraction, set it in the first extraction step. All following steps need to be defined using a regular expression.
Choose element type
As the next step, choose whether you want Conductor Website Monitoring to look for a string, a number, or a date. This is important not only for the extraction, but it also helps Conductor Website Monitoring to decide which filter to use on the column for this custom element on Pages.
If you choose a string, you can select these optional transformations of the extracted element:
-
Remove excessive whitespace: this will remove excessive whitespace in the extracted element, e.g. ` Jake Brown ` will be turned to
Jake Brown
-
Replace HTML entities: this will replace HTML entities by the corresponding characters, e.g.
&
will be replaced by&
-
Strip away HTML markup: this will remove all HTML tags, but their text content will be kept, e.g.
<p><span>Jake Brown</span></p>
will be turned intoJake Brown
- Drop empty values: if the extracted element does not contain any character, it will be considered not found
If you choose a number, also specify the format of the number on your pages so that Conductor Website Monitoring can correctly recognize it. This is different from the format in which the number will be displayed in the app, as that depends on the Language in your User Settings (opens in a new tab).
If you choose a date, also specify the format of the date on your pages so that Conductor Website Monitoring can correctly recognize it. This is different from the format in which the date will be displayed in the app, as that depends on the Language in your User Settings (opens in a new tab).
Tester
Before saving the element, you can use the tester to test the result of the extraction on a specific page.
Transformations
You can also specify additional operations to be applied to the extracted element before saving it. Just click on Add transformation and choose a transformation you need. You can define up to 6 transformations.
Count number of elements
Use this to get a number of extracted elements, e.g.
- Extracted elements:
James
Anna
Kim
- Result:
3
Set occurrence of the extraction steps to All to extract more than one element.
Measure length of string
This will compute the number of characters of the extracted element, e.g.
- Extracted element:
There are many different things which can break in SEO – sitemaps, meta information, page relationships, links… With Conductor Website Monitoring I feel like we’re finally in control of all of this.
- Result:
183
Prepend
This transformation adds a string before the extracted element, e.g.
- Extracted element:
9.90
- String to prepend:
$
- Result:
$ 9.90
Append
This will add a string after the extracted element, e.g.
- Extracted element:
9.90
- String to append: ` EUR`
- Result:
9.90 EUR
Replace
This will replace a part of the string by another string, e.g.
- Extracted element:
North Carolina: Raleigh
- Search for:
North Carolina
- Replace with:
NC
- Result:
NC: Raleigh
Truncate
This transformation limits the string length to the specified number of characters, e.g.
- Extracted element:
4.9 out of 5
- Max. length:
3
- Result:
4.9
Concatenate
This transformation will join extracted elements into one string, e.g.
- Extracted elements:
James
Anna
Kim
- Separator:
,
- Result:
James, Anna, Kim
Set occurrence of the extraction steps to All to extract more than one element.
Regular expression
Use this to apply a regular expression to the extracted element. Result of this transformation will be an extracted element where the output pattern was applied to the characters found by the input pattern.
This transformation can act as other transformations, such as replace, append, prepend, truncate or concatenate.
Compute MD5 hash
This will uniquely concatenate all elements and compute an MD5 hash.