Script integration
Endpoint
<%= signalCollectorUrl %>/api/v2/tenants/<%= tenantId %>/scripts
example:
...
<script src="<%= signalCollectorUrl %>/api/v2/tenants/<%= tenantId %>/scripts"></script>
...
To avoid issues on the customer page if GAH script can’t be loaded, you can add the following lines before including the script:
...
<script> revisitid=ifp_visitId="undefined",ifp_initUseCase=ifp_initView=ifp_finalizeView=ifp_finalizeUseCaseAndView=function(){var i=arguments,e=i.length-1;0<=e&&"function"==typeof i[e]&&i[e]("undefined")};
</script>
<script src="<%= signalCollectorUrl %>/api/v2/tenants/<%= tenantId %>/scripts"></script>
...
Request Parameters
| Parameter | Value | Description | Parameter Type | Data Type |
|---|---|---|---|---|
| partners | Optional | Partner script list to include in the current page. By default, all partners scripts are included. Available partners are: "GemaltoRiskEngine" and "ThreatMetrix" example: ../script?partners=GemaltoRiskEngine&partners=ThreatMetrix | Query param | String Default: all partners |
| auto | Optional | When set to 1 (true), the ifp_initUseCase and ifp_initView method are called automatically | Query param | 0 or 1 Default: 0 |
| visitId | Optional | Keep a previously generated visitId. Usefull when the Use Case is split in several pages | Quary param | String Default: generate a new visitId |
Response Messages
| HTTP Status Code | Reason | Content |
|---|---|---|
| 200 | Success | Script to execute for collecting data |
Note:
Ideally, this script should be the first to be loaded. Its size is small and will not impact the loading of the page. The downloaded script contains all the required methods to be used later, and will also load asynchronously the partners’ scripts.