Sensor Integration

Using Code Defender can be easily done in both cases of sensor integration, Third Party or First Party.

To ensure optimal functionality of our sensor, here are our Best Practice recommendations:

1) Snippet Code -
First Party is the recommended integration.
example for PX_SENSOR_URL - //client.px-cloud.net/PX1234/main.min.js

<script src="PX_SENSOR_URL" async ></script>

If custom parameters are needed

<script type="text/javascript">
    (function(){
        // Custom parameters
        // window._pxParam1 = "<param1>";
    }());
</script>
<script src="PX_SENSOR_URL" async />

2) Snippet Location -
The snippet should be placed within the <head> tag
The visibility of the sensor can be affected if the snippet is not placed in the <head> tag.

3) Snippet Order -
Place the snippet at the top of the <head> tag.
If it is placed lower in the head, the coverage will be less.


Did this page help you?