Through the code search in the Optimizer you are able to search for specific words or phrases within all the files on your website. There are a number of sensible use-cases for a regular utilisation of the code search.
Before you are able to use the code search you will need to add your website as a project to the SISTRIX Optimizer. We show you a step-by-step guide on how to create a new project in the first part of our tutorial “Create your own Visibility Index“. Once your project is ready, switch to it and go to “Analyse -> Code Search” in the left-hand navigation.
Code Search for an audit after a relaunch
The following will likely be very familiar to you: your website has gotten a new design – or maybe even a completely new system – and something is missing. The implementations of Google Analytics, AdServer-tracking, AdSense etc. for example. This is quite annoying as you will either be missing some of the data you are tracking or, in the case of AdServer-codes, your advertisements may not be displayed in their entirety or might be missing altogether.
With the code search you will be able to check for a complete integration. If you are planning on using the Google Tag Manager on your website you could follow these steps to check on which pages the tracking-code is missing.
Type an expressive part of the tracking-code (in this case googletagmanager.com) into the search bar and check the “Inverted search” option. As a result you will see all the pages on your website which are missing the Google Tag Manager Tracking integration.
You can click on “show more” and we will show you the source-code that was searched on the URL our SISTRIX crawler has on file.
Find malware and other unwanted code
You should check your website for malware and other unwanted content in your source-code in regular intervals. Here the code search can also help you. Words such as “Cialis, Viagra, Backgammon, Online Poker etc.” should normally return no results for your website. If they do show up, you should either know about them, at which time it becomes acceptable, or they will be part of code that has infiltrated your website – usually as part of outgoing links – and you should be alarmed.
The following example shows a search for “Viagra” in the source-code of sistrix.com.
The result is positive. The searchphrase shows up as part of this very tutorial, covering an applicable subject matter. As the owner of the website you know it is there. If, at any point, you find a result that is unknown to you, you have to pursue this matter.
The code search in the Optimizer enables you to quickly and easily check the HTML source-code of all the pages the Optimizer has crawled for your domain. This is especially important when you are searching for missing tracking-codes or words that you do not want on your website (while checking for malware).