Custom First Party Sensor Endpoint

The default first party endpoint to retrieve the HUMAN sensor is /<app_id_without_PX>/init.js. In certain cases (adblockers, etc.) it may be beneficial to change this endpoint name to a different value. You can do this by configuring a custom endpoint name using this configuration.

1"px_custom_first_party_sensor_endpoint": "/botdefense"

The /<app_id_without_PX>/init.js endpoint will continue to work even when a custom endpoint is configured.

You should also modify the snippet on the HTML pages served to refer to this custom endpoint.

1// JS snippet code
2
3(function(){
4 // Custom parameters
5 // window._pxParam1 = "<param1>";
6 var p = document.getElementsByTagName('script')[0],
7 s = document.createElement('script');
8 s.async = 1;
9 s.src = '/botdefense'; // custom endpoint
10 p.parentNode.insertBefore(s,p);
11}());