{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"SDK Reference","type":"markdown"},"seo":{"title":"Functions","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"functions","__idx":0},"children":["Functions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All methods are exposed on the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cordova.drs"]}," object, which becomes available once the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deviceready"]}," event has fired."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initializesdk","__idx":1},"children":["initializeSDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["initializeSDK"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializes the plugin using platform-specific configuration files (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransmitSecurity.plist"]}," on iOS, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strings.xml"]}," values on Android). This is the recommended initialization approach."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns","__idx":2},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Resolves when initialization succeeds and rejects on failure (missing configuration or SDK error)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example","__idx":3},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"document.addEventListener('deviceready', function () {\n  cordova.drs.initializeSDK()\n    .then(function () {\n      console.log('Fraud Prevention SDK initialized');\n    })\n    .catch(function (err) {\n      console.error(err.code, err.message);\n    });\n});\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initialize","__idx":4},"children":["initialize"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["initialize"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializes the plugin with explicit parameters. Use this when you need to provide credentials programmatically instead of relying on platform configuration files."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":5},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Your client identifier"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["API base URL for your environment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-accountprotection/interfaces/tsinitsdkconfiguration"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSInitSDKConfiguration"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional configuration for location tracking"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional user ID to set during initialization"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-1","__idx":6},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Resolves when initialization succeeds and rejects on failure."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-1","__idx":7},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"cordova.drs.initialize(\n  '[CLIENT_ID]',\n  'https://api.transmitsecurity.io/risk-collect/',\n  { enableLocationEvents: true },\n  null // optional userId\n);\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"triggeraction","__idx":8},"children":["triggerAction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["triggerAction"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locationConfig?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customAttributes?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-accountprotection/interfaces/tssetactionresponse"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSSetActionResponse"]}]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Reports a user action event and returns an action token. The action token should be passed to your backend to fetch risk recommendations via the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/risk/recommendations.openapi/other/getriskrecommendation"},"children":["Recommendation API"]},". This method does not throw on SDK rejection—check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.success"]}," and use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.actionToken"]}," when successful."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-1","__idx":9},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The type of user action to report (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-accountprotection/enums/tsaction"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSAction"]}]}," values)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-accountprotection/interfaces/tsactioneventoptions"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSActionEventOptions"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Additional context for the action event"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locationConfig?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-accountprotection/interfaces/tslocationconfig"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSLocationConfig"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Controls location data collection for this action (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/report_geolocation"},"children":["Track geolocation"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customAttributes?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Additional contextual data for the action; must match the schema defined in the Portal (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/action-attributes"},"children":["Custom attributes"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-2","__idx":10},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/cordova-ts-accountprotection/interfaces/tssetactionresponse"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSSetActionResponse"]}]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-2","__idx":11},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"cordova.drs.triggerAction(\n  'login',\n  {\n    correlationId: 'CORRELATION_ID',\n    claimedUserId: '91e25bea0c...', // hashed email\n    claimedUserIdType: 'email'\n  },\n  { mode: 'default' },\n  { userLevel: 'premium' }\n).then(function (result) {\n  if (result.success) {\n    console.log('Action Token:', result.actionToken);\n  }\n});\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setauthenticateduser","__idx":12},"children":["setAuthenticatedUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setAuthenticatedUser"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sets the user context for all subsequent events in the session (or until the user is explicitly cleared). It should be called only after you've fully authenticated the user (including, for example, any 2FA that was required). On Android, call this after the WebView activity is visible."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-2","__idx":13},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Opaque identifier of the user in your system"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional user attributes"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-3","__idx":14},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if the call succeeded."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-3","__idx":15},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"await cordova.drs.setAuthenticatedUser('user-123', {\n  loginMethod: 'password',\n  email: 'user@example.com'\n});\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"clearuser","__idx":16},"children":["clearUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["clearUser"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Clears the user context for all subsequent events in the mobile session. The user is automatically cleared once the session expires or in case of a new login action."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-4","__idx":17},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if the call succeeded."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-4","__idx":18},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"await cordova.drs.clearUser();\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"getsessiontoken","__idx":19},"children":["getSessionToken"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getSessionToken"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns a device session token that can be used to trigger action events via the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/quick_start_backendapi"},"children":["Backend API"]},". The session token binds user interactions to their device and is required for backend integrations. Call this after plugin initialization and before triggering events."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-5","__idx":20},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The session token."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-5","__idx":21},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const sessionToken = await cordova.drs.getSessionToken();\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"logpageload","__idx":22},"children":["logPageLoad"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["logPageLoad"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageName"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Reports a page-load event for behavioral data collection. The plugin tracks WebView navigation automatically, so use this method only when your app uses a custom SPA router and you want to report explicit page names."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-3","__idx":23},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The name of the screen or page the user navigated to"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-6","__idx":24},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-6","__idx":25},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"await cordova.drs.logPageLoad('Dashboard');\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setloglevel","__idx":26},"children":["setLogLevel"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setLogLevel"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isLogEnabled"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enables or disables verbose plugin logging for debugging purposes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-4","__idx":27},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isLogEnabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to enable debug logging"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-7","__idx":28},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-7","__idx":29},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"await cordova.drs.setLogLevel(true);\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"style","attributes":{},"children":["\ntable th:first-of-type {\n    width: 30%;\n}\ntable th:nth-of-type(2) {\n    width: 30%;\n}\ntable th:nth-of-type(3) {\n    width: 40%;\n}\n"]}]},"headings":[{"value":"Functions","id":"functions","depth":1},{"value":"initializeSDK","id":"initializesdk","depth":2},{"value":"Returns","id":"returns","depth":3},{"value":"Example","id":"example","depth":3},{"value":"initialize","id":"initialize","depth":2},{"value":"Parameters","id":"parameters","depth":3},{"value":"Returns","id":"returns-1","depth":3},{"value":"Example","id":"example-1","depth":3},{"value":"triggerAction","id":"triggeraction","depth":2},{"value":"Parameters","id":"parameters-1","depth":3},{"value":"Returns","id":"returns-2","depth":3},{"value":"Example","id":"example-2","depth":3},{"value":"setAuthenticatedUser","id":"setauthenticateduser","depth":2},{"value":"Parameters","id":"parameters-2","depth":3},{"value":"Returns","id":"returns-3","depth":3},{"value":"Example","id":"example-3","depth":3},{"value":"clearUser","id":"clearuser","depth":2},{"value":"Returns","id":"returns-4","depth":3},{"value":"Example","id":"example-4","depth":3},{"value":"getSessionToken","id":"getsessiontoken","depth":2},{"value":"Returns","id":"returns-5","depth":3},{"value":"Example","id":"example-5","depth":3},{"value":"logPageLoad","id":"logpageload","depth":2},{"value":"Parameters","id":"parameters-3","depth":3},{"value":"Returns","id":"returns-6","depth":3},{"value":"Example","id":"example-6","depth":3},{"value":"setLogLevel","id":"setloglevel","depth":2},{"value":"Parameters","id":"parameters-4","depth":3},{"value":"Returns","id":"returns-7","depth":3},{"value":"Example","id":"example-7","depth":3}],"frontmatter":{"seo":{"title":"Functions"}},"lastModified":"2026-07-26T12:47:04.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-ref/cordova-ts-accountprotection/drs","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}