PactSafe

The PactSafe Developer Hub

Welcome to the PactSafe developer hub. You'll find comprehensive guides and documentation to help you start working with PactSafe as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

Debugging with PS.js

You can optionally enable debugging in our JavaScript library by adding a flag right after you load your _ps('create') call in our JavaScript library:

(function(w,d,s,c,n,a,b){w['PactSafeObject']=n;w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},w[n].on=function(){(w[n].e=w[n].e||[]).push(arguments)},w[n].once=function(){(w[n].eo=w[n].eo||[]).push(arguments)},w[n].off=function(){(w[n].o=w[n].o||[]).push(arguments)},w[n].t=1*new Date();a=d.createElement(s),b=d.getElementsByTagName(s)[0];a.async=1;a.src=c;b.parentNode.insertBefore(a,b)})(window,document,'script','//vault.pactsafe.io/ps.min.js','_ps');

_ps('create', 'YOUR_ACCESS_ID');

_ps.debug = true;

By enabling this flag, you'll start seeing all sorts of events in your console and be able to track various events and triggers from our library as you coding!