JavaScript Snippet

TO set custom parameters:

  1. Login to Console.
  2. Go to Platform Settings > Applications > Overview.
  3. Select the required application and go to Integration details.
    Integration_details_2
  4. In the Snippet window, click CopyCopy.
  5. Before embedding the snippet into your application, add this line of code for each custom parameter:
    window._pxParamN = "<paramN_value>".

Example
To extract the value of my_cookie, add a custom parameter in this format:

1<script type="text/javascript">
2 (function(){
3 window._pxAppId =APP_ID;
4 // Custom parameters
5 window._pxParam1 = getCookie('my_cookie');
6 var p = document.getElementsByTagName('script')[0],
7 s = document.createElement('script');
8 s.async = 1;
9 s.src = '//client.perimeterx.net/APP_ID/main.min.js';
10 p.parentNode.insertBefore(s,p);
11 }());
12</script>