DataUnlocker Defender is a powerful frontend protection layer that shields your website’s tracking and marketing tools from ad blockers and privacy extensions. It works by removing detectable patterns in your web app's code and network activity, ensuring your analytics stack remains operational — even in hostile environments.
To learn more about what Defender does under the hood, see Defender Setup.
There are two primary ways to integrate Defender:
Framework integration is the recommended method for most modern web applications. It involves installing Defender as a dependency and wrapping your application logic using framework-specific packages.
We offer pre-built packages for popular frontend frameworks:
For example, in a React app, you would wrap your app with the <Defender>
component:
Advanced users can use the lower-level base package: @dataunlocker/defender. All framework-specific packages are built on top of it.
Use the base package only if you understand the internals of your app’s rendering and lifecycle. It allows more control but requires careful setup.
If your site is built with a CMS, static site builder, or no-code platform, you can use the universal integration method.
Upload your compiled JavaScript file to DataUnlocker, and we’ll return a patched version with Defender seamlessly embedded.
This method is useful for:
Before integrating Defender (with either method), you must:
See Transport Setup for full instructions.
Once integrated, Defender loads asynchronously to avoid blocking your site’s content:
If you use analytics tools (like Google Analytics or Meta Pixel), ensure they wait for Defender to be ready before sending any events. Otherwise, those requests may leak unprotected. To learn how to configure your trackers properly, see Configuration Guide.
With Defender in place, your tracking and marketing tools are deeply integrated and resilient, making them indistinguishable for privacy tools from the rest of your application.