Javascript SDK Configuration
How to use special SDK configuration
The web application tag can be configured either using the UI SDK settings or directly on the tag level. The tag level configuration will prevent any UI configuration change and is normally used as a security measure.
Name | Description | Default |
htmlSanitization |
The SDK will scan guide content for scripting or risky elements and will not display the guide in case one found. | false (optional) |
htmlSanitizationAllowedDomains |
Specify exclusive domain URLs for hosting content which is referenced by the in-product guides (e.g. images) | null (optional) |
engagementChecksumFileUrl |
In case you would like to host an in-product engagement checksum file to be verified before the SDK will present the content use this config. This is an extreme measure that can be used in case you would like to lock the engagement content. Any changes to the guide requires updating the CDN checksum file. |
null (optional) |
usePOST |
In case you would like the tracking calls to use HTTP POST and not GET | false |
How to use the configuration object in the SDK
<script type="text/javascript"> (function(n,t,a,e,co){var i="aptrinsic";n[i]=n[i]||function(){ (n[i].q=n[i].q||[]).push(arguments)},n[i].p=e;n[i].c=co; var r=t.createElement("script");r.async=!0,r.src=a+"?a="+e; var c=t.getElementsByTagName("script")[0];c.parentNode.insertBefore(r,c) })(window,document,"https://web-sdk.aptrinsic.com/api/aptrinsic.js","AP-************-2", { <!-- setting content security polic --> "htmlSanitization": true, "htmlSanitizationAllowedDomains": ["https://allow.this.domain.com"] <!-- setting checksum endpoint --> "engagementChecksumFileUrl": "https://your.domain.com/checksums.json" } );
Using SDK Settings
Alternatively, you can specify some of the settings using the UI
Exporting the engagement checksum file can be done using the UI
If the SDK is using the checksum 'engagementChecksumFileUrl' configuration it will automatically match any real-time engagement with the hosted checksum.
It is recommended to use checksum in stage and production. You can avoid the settings in the QA environment to avoid the need to frequently update the checksum file.