How Do I Use The Script Removal App?

Modified on: Wed, 31 Mar, 2021

If you are using any plugins which work by injecting script to insert ads on your original setup, you can use the Script Remover App to remove these ads on Ezoic versions of the site, to avoid diluting the testing results.

 

*For all other existing ads on your original setup, please see our article on wrapping ads - Click here for more info.


How do I Set up Script removal?

 

1. Go to the Content tab of your Ezoic dashboard, then Turn On Script removal.


image


2. Click "Settings"

image

 

2. Click “Add To Removed Scripts”:


image


3. Give the script a name - this is something that you can recognise it by and add a regex to uniquely identify the script. A Regular Expression, or Regex, is a special text string for describing a search pattern. The Script Regex will look for the pattern that is submitted and remove any tag containing that pattern. E.g if you wanted to remove any scripts containing "yellow" from your site, then an example of the regex you would submit to remove it would be the following:


Script Name = Yellow, Script Regex = yellow


image



Both of these example scripts would then be removed from your site:


<script src="https://yellow.com"></script>, <script src="https://ezoic.com/yellow"></script>


You can also make more dynamic patterns:

If Script Regex = green/[abc] any script containing green/a, green/b or green/c will be removed. But a script containing green/f, would stay


There are many more examples that you can reference and test out at regex101.com

Make sure you place the scripts that you wish to remove inside of Test String, then enter your Script Regex in Regular Expression. If there is a match, then it will be removed.


One way to find the script is to:


  • Right click and inspect the element on your website - this will bring up the ad code in Chrome Developer Tools.
  • Search for the URL of the network or the Content Delivery Network.
  • Look for something succinct which uniquely identifies that particular code.


* Please note - do not add common expressions as this may tell our system to remove other parts of the page on Ezoic versions.


It can take approximately an hour after adding the script to the app before you’ll see changes on the site.


If the ad is not removed correctly, try:


  • Clearing cache and cookies
  • Amending the unique identifier in the “regex” field


What if there are scripts I want to keep?


You can also request to keep scripts removed by default (such as Taboola or Amazon scripts) within the app by clicking “keep” next to each script:


image


You will then be prompted to submit a reason for keeping a script.  To submit click "Keep Script":


image


Please note that these third-party scripts cannot be included in testing, which impacts ad density tracking and limits the overall performance of our A.I., which can negatively impact your EPMV.



Loading ...