Testing the script

After installing DataUnlocker's script, failing requests (requests blocked by ad blockers) will be proxied and return original successful response. However, there is always a little chance that you may break something by installing DataUnlocker's script, because it is not isolated by design.

Despite DataUnlocker's monkey-patching is thoroughly developed and tested by a huge number of integration tests for many scenarios and libraries, some very strange usages of browser APIs in your website's code may turn to be broken as a result of this monkey-patching. There are a few ways of testing that DataUnlocker's script works well for your website.

  • ⚠ Please report any unexpected behavior or errors caused by adding DataUnlocker's script to your websites, we will be happy to resolve any problems if they were caused by DataUnlocker.

Testing directly in production environment

You can use Tampermonkey extension for installing the script locally in your browser and trying it out directly on the production environment, before placing the actual script. Follow the steps below to configure the script in Tampermonkey:

  1. Install Tampermonkey either for Chrome or Firefox.
  2. Navigate to your website and click the extension in the browser extensions bar.
  3. Click "Create a new script".
  4. In the code window, find a commented line like @match https://yourwebsite.com.
  5. Append /* to this line to make it @match https://yourwebsite.com/*. This will make the script enabled on all pages of your website. You can also change @name of the script to be more friendly.
  6. Copy and paste DataUnlocker's script to the new script's code, removing HTML tags.
  7. Click "Save" (should be in the top "File" menu).
  8. Go to Settings of the script, and select document-start from the dropdown in "Run at". Thus, the script should be inserted before all other scripts on the page.
  9. Now by visiting your website DataUnlocker's script will be active, and you can navigate your website to test that everything works as expected. Testing your website without the actual proxy turned on should be fine to verify the compatibility with DataUnlocker's script.
  10. If you also want to test the proxy, proceed to the next health check step, and ensure that the DNS health check passes. You can ignore the script's health check, as it is installed locally in your browser. After getting the DNS health check green, go to property's Settings page and ensure DataUnlocker proxy is enabled.

Using Tampermonkey to install the script

Testing in development environment

Just inserting the script's code, even when DataUnlocker proxy is turned off, should be fine to verify that monkey-patching doesn't break your web application. However, if you want to test how proxy works, you will need to deploy a script to one of your testing environments, if you have any.

  • ☁ Note that you will need to create a separate DataUnlocker property if your development website uses another domain name, and install the script corresponding to that property.
DataUnlocker Logo
Content blockers are friends