Bypassing Adblockers
Bypassing adblockers require you to change the code snippet you put on your website, host the script and the endpoint yourself and route data to our servers afterwards.
This requires a small development effort to get it up and running but we are here to help with any technical questions.
There are two main steps that are covered below:
Hosting the Script
Our tracking script normally is hosted through the following url: https://cdn.jsdelivr.net/npm/hockeystack@latest/hockeystack.min.js
In order to host it on your own domain you should talk with your developer to host a Javascript file in your own domain (or subdomain). Once the file is hosted you should be able to visit the link your developer provides and see minified code output to make sure it is successful.
You need to put the newly created link into the code snippet. This is the original code snippet that you had put on your website during the implementation process. The snippet has an src attribute that normally points to our hosted url but you should switch it with your url.
There is an example at the end of this guide on how the change looks.
Hosting the Endpoint
The tracking script normally makes requests to an endpoint called https://data.hockeystack.com/send .
You should create a passthrough proxy in your hosting provider that points to data.hockeystack.com . This solution would not work with CNAME based approach because adblockers can detect and block it still.
Once you have that, add an extra data attribute to the code snippet called data-server-url . The value of this is the endpoint url you created starting with https:// but omitting the /send at the end.
For example, if you created an endpoint called https://yourdomain.com/hs-web-trck/v2/send then the url you should put as the value of data-server-url is https://yourdomain.com/hs-web-trck/v2.
NOTE: Be sure the new urls doesn't contain words such as "track", "hockeystack", or "tracker". Examples we suggest include, but are not limited to "pineapple", "alpaca", and "foobar".
How does it look in the code snippet as an example?
Keep in mind this is an example with a fake API key. You should make the change in the code snippet provided to you during the implementation process.
Change
to
If you have any other questions or issues, you can always reach us through live support or just send an email to [email protected]!
Last updated