### Initiate GDPR Forget Me Request Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Use this function to start the GDPR forget me process. This action is irreversible and should be used with caution. ```javascript Adjust.gdprForgetMe(); ``` -------------------------------- ### Initialize Adjust SDK Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Initiates the Adjust SDK instance. This should be called only once per page load. Ensure 'appToken' and 'environment' are correctly set. ```javascript Adjust.initSdk({ appToken: 'YOUR_APP_TOKEN', // required environment: 'production', // required, 'production' or 'sandbox' attributionCallback: function (e, attribution) { // optional // define your attribution callback function }, logLevel: 'verbose', // optional, default is 'error' logOutput: '#output', // optional, outputs logs from sdk into provided container // defaultTracker: 'YOUR_DEFAULT_TRACKER_TOKEN', // optional // externalDeviceId: 'YOUR_EXTERNAL_DEVICE_ID', // optional // customUrl: 'YOUR_CUSTOM_URL', // optional // eventDeduplicationListLimit: 'YOUR_EVENT_DEDUPLICATION_LIST_LIMIT' // optional // namespace: 'YOUR_CUSTOM_STORAGE_NAMESPACE' // optional }); ``` -------------------------------- ### Initialize Adjust SDK Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Initiates the Adjust SDK instance. This should only be called once per page load. ```APIDOC ## Initialize Adjust SDK ### Description Initiates the Adjust SDK instance. This should only be called once per page load. ### Method Adjust.initSdk ### Parameters #### Request Body - **appToken** (string) - Required - Your application token. - **environment** (string) - Required - The environment to use, either 'production' or 'sandbox'. - **attributionCallback** (function) - Optional - A callback function to define your attribution logic. - **logLevel** (string) - Optional - The logging level. Options: 'none', 'error', 'warning', 'info', 'verbose'. Default is 'error'. - **logOutput** (string) - Optional - A CSS selector for a container to output SDK logs. - **defaultTracker** (string) - Optional - Your default tracker token. - **externalDeviceId** (string) - Optional - Your external device ID. - **customUrl** (string) - Optional - A custom URL for SDK communication. - **eventDeduplicationListLimit** (number) - Optional - The limit for the event deduplication list. Default is 10. - **namespace** (string) - Optional - A custom namespace for SDK data storage. ### Request Example ```javascript Adjust.initSdk({ appToken: 'YOUR_APP_TOKEN', environment: 'production', attributionCallback: function (e, attribution) { /* your callback */ }, logLevel: 'verbose', logOutput: '#output', defaultTracker: 'YOUR_DEFAULT_TRACKER_TOKEN', externalDeviceId: 'YOUR_EXTERNAL_DEVICE_ID', customUrl: 'YOUR_CUSTOM_URL', eventDeduplicationListLimit: 20, namespace: 'YOUR_CUSTOM_STORAGE_NAMESPACE' }); ``` ``` -------------------------------- ### Adjust SDK Initialization Script Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html The core JavaScript snippet for loading and initializing the Adjust SDK. This is typically placed in the HTML head. ```javascript !function(e,t,r,a,n,o,l,i,s,c,d,h,u,f,m){var p=l+"\_q",g=l+"\_c";e[l]=e[l]||{},e[p]=e[p]||[],e[g]=e[g]||[];for(let t=0;tr.resolve(e))):e[l][e[p][t][0]].apply(e[l],e[p][t][1])}e[p]=[]},m.parentNode.insertBefore(f,m)}(window,document,"script",0,0,0,"Adjust",["initSdk","getAttribution","getWebUUID","setReferrer","trackEvent","addGlobalCallbackParameters","addGlobalPartnerParameters","removeGlobalCallbackParameter","removeGlobalPartnerParameter","clearGlobalCallbackParameters","clearGlobalPartnerParameters","switchToOfflineMode","switchBackToOnlineMode","stop","restart","gdprForgetMe","disableThirdPartySharing","trackThirdPartySharing","initSmartBanner","showSmartBanner","hideSmartBanner"],["waitForAttribution","waitForWebUUID"],["ThirdPartySharing",["addGranularOption","addPartnerSharingSetting"]],"__realObj",(function(e,t,r){e[r]=function(){t.push([r,arguments])}}),(function(e,t,r){e[r]=function(){const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),t.push([r,arguments,e]),e.promise}})); ``` -------------------------------- ### Global Parameters Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Methods for managing global callback and partner parameters. ```APIDOC ## Global Parameters ### Description Methods for managing global callback and partner parameters. ### Methods #### `addGlobalCallbackParameters(parameters)` Adds global callback parameters. - **parameters** (array) - An array of key-value pairs to add as global callback parameters. - **key** (string) - The key for the parameter. - **value** (string) - The value for the parameter. ```javascript Adjust.addGlobalCallbackParameters([ {key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'} ]); ``` #### `addGlobalPartnerParameters(parameters)` Adds global partner parameters. - **parameters** (array) - An array of key-value pairs to add as global partner parameters. - **key** (string) - The key for the parameter. - **value** (string) - The value for the parameter. ```javascript Adjust.addGlobalPartnerParameters([ {key: 'key-1', value: 'value-1'}, {key: 'key-2', value: 'value-2'}, {key: 'key-3', value: 'value-3'} ]); ``` #### `removeGlobalCallbackParameter(key)` Removes a global callback parameter by its key. - **key** (string) - The key of the global callback parameter to remove. ```javascript Adjust.removeGlobalCallbackParameter('key1'); ``` #### `removeGlobalPartnerParameter(key)` Removes a global partner parameter by its key. - **key** (string) - The key of the global partner parameter to remove. ```javascript Adjust.removeGlobalPartnerParameter('key-1'); ``` #### `clearGlobalCallbackParameters()` Clears all global callback parameters. ```javascript Adjust.clearGlobalCallbackParameters(); ``` #### `clearGlobalPartnerParameters()` Clears all global partner parameters. ```javascript Adjust.clearGlobalPartnerParameters(); ``` ``` -------------------------------- ### Track Revenue Event Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Tracks a revenue event, including currency and callback parameters. Requires the SDK to be initialized. The 'eventToken' is mandatory. ```javascript Adjust.trackEvent({ eventToken: 'YOUR_EVENT_TOKEN', // deduplicationId: 'YOUR_EVENT_DEDUPLICATION_ID' // optional revenue: 111, currency: 'EUR', callbackParams: [ {key: 'some-key-1', value: 'some-value-1'}, {key: 'some-key-2', value: 'some-value-2'}, {key: 'key1', value: 'new-value1'} ], partnerParams: [ {key: 'key-1', value: 'new-value-1'}, {key: 'some-partner-key-1', value: 'some-partner-value-1'}, {key: 'key-2', value: 'new-value-2'}, {key: 'some-partner-key-2', value: 'some-partner-value-2'}, {key: 'some-partner-key-1', value: 'some-partner-value-3'} ] }); ``` -------------------------------- ### Adjust.restart() Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Restarts the Adjust SDK. This can be useful for re-initializing the SDK after certain events or configurations have changed. ```APIDOC ## restart ### Description Restarts the Adjust SDK. ### Method JavaScript Function Call ### Endpoint N/A ### Parameters None ### Request Example ```javascript Adjust.restart(); ``` ### Response None ``` -------------------------------- ### SDK Control Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Methods for controlling the Adjust SDK's lifecycle. ```APIDOC ## SDK Control ### Description Methods for controlling the Adjust SDK's lifecycle. ### Methods #### `stop()` Stops the Adjust SDK. No further tracking or data will be sent. ```javascript Adjust.stop(); ``` #### `restart()` Restarts the Adjust SDK. This is typically used after calling `stop()`. ```javascript Adjust.restart(); ``` ``` -------------------------------- ### Add Global Partner Parameters Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Adds global partner parameters that will be sent with all subsequent events. Provide an array of key-value pairs. ```javascript Adjust.addGlobalPartnerParameters([ {key: 'key-1', value: 'value-1'}, {key: 'key-2', value: 'value-2'}, {key: 'key-3', value: 'value-3'} ]); ``` -------------------------------- ### SDK Mode Switching Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Methods to switch the SDK's operational mode. ```APIDOC ## SDK Mode Switching ### Description Methods to switch the SDK's operational mode. ### Methods #### `switchToOfflineMode()` Transitions the SDK to offline mode, preventing any tracking or communication. ```javascript Adjust.switchToOfflineMode(); ``` #### `switchBackToOnlineMode()` Transitions the SDK back to online mode after it has been switched to offline mode. ```javascript Adjust.switchBackToOnlineMode(); ``` ``` -------------------------------- ### Restart Adjust SDK Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Call this function to restart the Adjust SDK. Ensure it's used when necessary to re-initialize SDK services. ```javascript Adjust.restart(); ``` -------------------------------- ### Switch Back to Online Mode Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Resumes SDK operations and sends queued data after being in offline mode. ```javascript Adjust.switchBackToOnlineMode(); ``` -------------------------------- ### Track Standard Event Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Tracks a standard event. Requires the SDK to be initialized first. The 'eventToken' is mandatory. ```javascript Adjust.trackEvent({ eventToken: 'YOUR_EVENT_TOKEN', // deduplicationId: 'YOUR_EVENT_DEDUPLICATION_ID' // optional }); ``` -------------------------------- ### Smart Banner Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Methods for managing the Adjust Smart Banner. ```APIDOC ## Smart Banner ### Description Methods for managing the Adjust Smart Banner. ### Methods #### `initSmartBanner(options)` Initializes the Adjust Smart Banner with configuration options. - **options** (object) - Configuration options for the Smart Banner. ```javascript Adjust.initSmartBanner({ // Smart Banner configuration options here }); ``` #### `showSmartBanner()` Shows the Adjust Smart Banner. ```javascript Adjust.showSmartBanner(); ``` #### `hideSmartBanner()` Hides the Adjust Smart Banner. ```javascript Adjust.hideSmartBanner(); ``` ``` -------------------------------- ### Add Global Callback Parameters Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Adds global callback parameters that will be sent with all subsequent events. Provide an array of key-value pairs. ```javascript Adjust.addGlobalCallbackParameters([ {key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'} ]); ``` -------------------------------- ### Track Event Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Tracks a standard or revenue event. Requires the SDK to be initialized. ```APIDOC ## Track Event ### Description Tracks a standard or revenue event. Requires the SDK to be initialized. ### Method Adjust.trackEvent ### Parameters #### Request Body - **eventToken** (string) - Required - The token for the event. - **deduplicationId** (string) - Optional - A unique identifier for event deduplication. - **revenue** (number) - Optional - The revenue associated with the event (for revenue events). - **currency** (string) - Optional - The currency of the revenue (e.g., 'EUR'). - **callbackParams** (array) - Optional - An array of key-value pairs for callback parameters. - **key** (string) - The key for the callback parameter. - **value** (string) - The value for the callback parameter. - **partnerParams** (array) - Optional - An array of key-value pairs for partner parameters. - **key** (string) - The key for the partner parameter. - **value** (string) - The value for the partner parameter. ### Request Example (Standard Event) ```javascript Adjust.trackEvent({ eventToken: 'YOUR_EVENT_TOKEN', deduplicationId: 'YOUR_EVENT_DEDUPLICATION_ID' }); ``` ### Request Example (Revenue Event) ```javascript Adjust.trackEvent({ eventToken: 'YOUR_EVENT_TOKEN', deduplicationId: 'YOUR_EVENT_DEDUPLICATION_ID', revenue: 111, currency: 'EUR', callbackParams: [ {key: 'some-key-1', value: 'some-value-1'}, {key: 'some-key-2', value: 'some-value-2'}, {key: 'key1', value: 'new-value1'} ], partnerParams: [ {key: 'key-1', value: 'value-1'}, {key: 'some-partner-key-1', value: 'some-partner-value-1'}, {key: 'key-2', value: 'new-value-2'}, {key: 'some-partner-key-2', value: 'some-partner-value-2'}, {key: 'some-partner-key-1', value: 'some-partner-value-3'} ] }); ``` ``` -------------------------------- ### Adjust.gdprForgetMe() Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Initiates a GDPR forget me request. This method should be used to comply with GDPR regulations by removing user data. ```APIDOC ## gdprForgetMe ### Description Initiates a GDPR forget me request. ### Method JavaScript Function Call ### Endpoint N/A ### Parameters None ### Request Example ```javascript Adjust.gdprForgetMe(); ``` ### Response None ``` -------------------------------- ### Clear Global Partner Parameters Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Clears all previously set global partner parameters. ```javascript Adjust.clearGlobalPartnerParameters(); ``` -------------------------------- ### Adjust.disableThirdPartySharing() Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Initiates a marketing opt-out request. Use this method to disable third-party data sharing for marketing purposes. ```APIDOC ## disableThirdPartySharing ### Description Initiates a marketing opt-out request. ### Method JavaScript Function Call ### Endpoint N/A ### Parameters None ### Request Example ```javascript Adjust.disableThirdPartySharing(); ``` ### Response None ``` -------------------------------- ### Switch to Offline Mode Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Puts the Adjust SDK into offline mode, preventing any tracking or communication until switched back online. ```javascript Adjust.switchToOfflineMode(); ``` -------------------------------- ### Stop Adjust SDK Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Stops the Adjust SDK, ceasing all tracking and data processing. Use with caution as it may require re-initialization. ```javascript Adjust.stop(); ``` -------------------------------- ### Remove Global Partner Parameter Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Removes a specific global partner parameter by its key. ```javascript Adjust.removeGlobalPartnerParameter('key-1'); ``` -------------------------------- ### Privacy Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Methods related to user privacy and data management. ```APIDOC ## Privacy ### Description Methods related to user privacy and data management. ### Methods #### `gdprForgetMe()` Initiates the GDPR forget me process for the user. This will remove all user data associated with the current device. ```javascript Adjust.gdprForgetMe(); ``` #### `disableThirdPartySharing()` Disables third-party sharing for the Adjust SDK. ```javascript Adjust.disableThirdPartySharing(); ``` #### `trackThirdPartySharing(options)` Tracks third-party sharing events with granular options. - **options** (object) - An object containing sharing options. - **addGranularOption** (object) - Adds a granular sharing option. - **key** (string) - The key for the granular option. - **value** (string) - The value for the granular option. - **addPartnerSharingSetting** (object) - Adds a partner sharing setting. - **key** (string) - The key for the partner setting. - **value** (string) - The value for the partner setting. ```javascript Adjust.trackThirdPartySharing({ addGranularOption: { key: 'granular_key', value: 'granular_value' }, addPartnerSharingSetting: { key: 'partner_key', value: 'partner_value' } }); ``` ``` -------------------------------- ### Clear Global Callback Parameters Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Clears all previously set global callback parameters. ```javascript Adjust.clearGlobalCallbackParameters(); ``` -------------------------------- ### Disable Third-Party Sharing Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Initiates a marketing opt-out request by disabling third-party sharing. This is crucial for user privacy compliance. ```javascript Adjust.disableThirdPartySharing(); ``` -------------------------------- ### Remove Global Callback Parameter Source: https://github.com/adjust/web_sdk/blob/master/src/demo.html Removes a specific global callback parameter by its key. ```javascript Adjust.removeGlobalCallbackParameter('key1'); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.