Integrating device profiling - Web app (enhanced)
Instead of using the ThreatMetrix IdP Adapter to collect the device profile, you can capture the device profile using an existing sign-on page. This can reduce perceived wait times for the user.
About this task
You can adapt these instructions to add device profiling to any page, such as the HTML Form Adapter or your external web app. The page must meet the criteria listed in Device profiling methods.
There are two device profiling scripts to choose from, including the "SDK" and "Web" scripts. For a description of the differences, see Introduction to Profiling in the ThreatMetrix documentation.
Steps
-
If you want to use the ThreatMetrix SDK script, do the following:
-
If you are modifying an external web application, copy the
tmx_sdk_profiling.js
file from the integration.zip
archive to a location that your page can access. -
Add the following code to the sign-on page:
<script type="text/javascript" src="tmx_sdk_profiling.js"></script> <script type="text/javascript">pinghelper.run("https://h-api.online-metrix.net", "<orgId>");</script>
Substitute your organization ID and adjust the path to the script file.
If you are modifying a PingFederate template, the script path is
../assets/scripts/tmx_sdk_profiling.js
.
If you requested a custom device profiling domain in Configuring ThreatMetrix, substitute it here.
-
-
If you want to use the ThreatMetrix Web script, do the following:
-
If you are modifying an external web application, copy the
tmx_web_profiling.js
file from the integration.zip
archive to a location that your page can access. -
In the
tmx_web_profiling.js
file, substitute your organization ID:var deviceProfilingDomain = "h.online-metrix.net"; var orgId = "orgId";
If you requested a custom device profiling domain in Configuring ThreatMetrix, substitute it here.
-
Add the following to the sign-on page and adjust the path to the script file:
<script type="text/javascript" src="tmx_web_profiling.js"></script>
If you are modifying a PingFederate template,
../assets/scripts/tmx_web_profiling.js
is the script path.
-
-
Optional: In the script file, customize the name prefix for the device profile cookie to suit your environment.
var cookieNamePrefix = "tmxSessionID";
-
When you complete the steps in Configuring an adapter instance, do the following:
-
Set Device Profiling to Use existing ThreatMetrix session ID.
-
Update the Cookie Name Prefix field if you customized it above.
-