---
title: "Advanced Configuration Guide"
slug: "analytics-advanced-configuration-guide"
updated: 2023-09-05T15:38:58Z
published: 2023-09-05T15:38:58Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://onpremises.webtrends.help/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced Configuration Guide

## Advanced Configuration Guide Document

### Setting Configuration Settings via WTDataCollector

All configuration settings may be set programmatically using the method [WTDataCollector setValue:forConfigKey:persists:]. All settings are stored as strings. Each configuration key is associated with a constant for easier reference.

See Configuration Settings below for details.

For example, to set the maximum number of persisted events config setting, use the following line of code:

**Swift**

```
WTDataCollector.kWTConfigMaxPersistedEvents.sharedCollector().setValue("10000", forConfigKey:kWTConfigMaxPersistedEvents,
persists:true)
```

**Objective-C**

```
[[WTDataCollector sharedCollector] setValue:@"10000" forConfigKey:kWTConfigMaxPersistedEvents
persists:YES];
```

If the persists flag is set to YES, the configuration setting will be written to disk and persisted across application stops and starts. If it is set to NO, the setting will only be set in memory and will reset to the value stored in webtrends.plist or its default value.

### Setting Configuration Settings via webtrends.plist

Configuration settings may also be set by editing the webtrends.plist file. Settings defined in the this file will have a lower priority than settings defined programmatically via the [WTDataCollector setValue:forConfigKey:persists:] method. If you choose to edit the webtrends.plist file directly, you must use the string literals as keys, not the constant name.

![image.png](https://cdn.document360.io/0afe9842-6601-4812-b9e2-2726979f2233/Images/Documentation/image%2841%29.png)

### Configuration Settings

The following settings are known to the Webtrends SDK. Changing the values associated with any of them will change the behavior of the SDK as explained under each setting’s “Description”.

#### App Delegate Class Name

**Description:** Sets the name of the AppDelegate class for your application. This is only required if you are changing the default from “AppDelegate” and you are using Automatic Events. **String Literal:** wt_dc_app_delegate_class_name **Constant Name:** kWTAppDelegateClassName **Default Value:** “AppDelegate" **Acceptable Values:** Any valid class name

---

#### Automatic Events Enabled

**Description:** Controls whether or not certain events will be logged automatically. See the Automatic Events Guide for details on what events are automatically collected. **String Literal:** wt_dc_automatics_enabled **Constant Name:** kWTConfigAutomaticsEnabled **Default Value:** “false" **Acceptable Values:** *boolean as a string* — "true” or “false”

---

#### Automatic Send Threshold Percent

**Description:** Percentage of the event store capacity (defined in the Max Persisted Events configuration setting) at which events will be automatically sent to the Webtrends data collection servers. This setting expects an integer from 0 to 100, inclusive. **String Literal:** wt_dc_auto_send_threshold_percent **Constant Name:** kWTConfigAutoSendThresholdPercent **Default Value:** “80" **Acceptable Values:** *integer as a string* — (an integer from "0” to “100”, inclusive)

---

#### Battery Minimum Charge Percentage

**Description:** Controls at what battery level to stop Webtrends event transmission. When the battery level falls below this level, event transmission to the Webtrends data collection servers is disabled. After iOS reports that battery power is restored to a level above this threshold, event transmission will resume. Since iOS reports battery levels to the SDK in increments of 5%, actual battery level may not trigger event transmission to resume immediately, depending on the value of this configuration setting. **String Literal:** wt_dc_battery_min_charge_percent **Constant Name:** kWTConfigBatteryMinimumChargePercentage **Default Value:** “20" **Acceptable Values:** *integer as a string* — an integer between "0” and “100”, inclusive

---

#### Collection URL Base

**Description:** The URL address of the Webtrends data collection server **String Literal:** wt_dc_collection_url_base **Constant Name:** kWTConfigCollectionUrlBase **Default Value:** “https://scs.webtrends.com/v2/" **Acceptable Values:** *string* — A valid URL string including the protocol (http:// or https://)

---

#### DCSID

**Description:** The Webtrends-assigned DCSID or Account GUID used for this account **String Literal:** wt_dc_dcsid **Constant Name:** kWTConfigDCSID **Default Value:** none **Acceptable Values:** Webtrends-supplied DCSID string

          Important Note:

          

While not strictly required, your app must be configured with a valid DCSID for the data to be collected by your SDC.

---

#### Debug Logging Enabled

**Description:** Enables or disables debug logging for the SDK. When enabled, event transmission and SDK state information will be printed to the console. **String Literal:** wt_dc_debug **Constant Name:** kWTConfigDebug **Default Value:** “true" **Acceptable Values:** *boolean as a string* — "true” or “false”

---

#### Events Per Send

**Description:** Events are collected and sent in batches to the Webtrends data collection servers. This setting controls the number of events to send in a single batch. **String Literal:** wt_dc_event_send_maximum **Constant Name:** kWTConfigEventsPerSend **Default Value:** “500" **Acceptable Values:**

          Important Note:

          

Needs to be reset to "1", OnPremises SDCs do not have the capacity for batch event processing.

---

#### Extra Parameters for All Events

**Description:** If set, these key/value pairs will be sent along with every event. Format the query parameters as valid JSON e.g.: ***{"foo":"bar","fee":"fum"}***. **String Literal:** wt_dc_extra_params **Constant Name:** kWTConfigExtraParams **Default Value:** empty string **Acceptable Values:** *comma separated key=value string formatted as JSON* {“key1”:“value1”,“key2”:“value2”,…}

          Note:

          

If you are upgrading an older implementation, this replaces wt_dc_collection_url_extra_query_params which has been deprecated. The only difference is the name, which reflects the way that extra parameters are now passed to the collection servers. The SDK now passes this data within the body of the event (as part of the payload), not in the query string.

If values are set in this setting and key/value pairs with the same keys (name collision) are passed in using the withCustomParams: parameter, the customParams will take precedence over values in this setting.

---

#### HTTP Connection Timeout Milliseconds

**Description:** Controls the maximum amount of time (in milliseconds) to pass before abandoning a Webtrends SDK-related HTTP request. **String Literal:** wt_dc_http_connect_timeout_millis **Constant Name:** kWTConfigHTTPConnectionTimeoutMilliseconds **Default Value:** “10000" **Acceptable Values:** *integer as a string* — (any valid positive integer value)

---

#### HTTP Read Timeout Milliseconds

**Description:** Controls the maximum amount of time to wait (in milliseconds) for a response from a Webtrends SDK-related HTTP connection. **String Literal:** wt_dc_http_read_timeout_millis **Constant Name:** kWTConfigHTTPReadTimeoutMilliseconds **Default Value:** “30000" **Acceptable Values:** *integer as a string* — (any valid positive integer value)

---

#### Max Events Per Request

**Description:** If the application is configured to use API version 2 (or higher), this setting controls how many events are bundled in a single HTTP request. **String Literal:** wt_dc_max_events_per_request **Constant Name:** kWTConfigMaxEventsPerRequest **Default Value:** “250" **Acceptable Values:** *integer as a string* — (any valid positive integer value)

---

#### Max Persisted Events

**Description:** The maximum number of events to store locally on the device. If new events are generated while the event store is full, the oldest events will be permanently deleted. **String Literal:** wt_dc_event_table_size_maximum **Constant Name:** kWTConfigMaxPersistedEvents **Default Value:** “5000" **Acceptable Values:** *integer as a string* — (any valid positive integer value)

---

#### Max Session Milliseconds

**Description:** Controls the maximum amount of time (in milliseconds) to wait before forcing a new session to start. **String Literal:** wt_dc_max_session_millis **Constant Name:** kWTConfigMaxSessionMilliseconds **Default Value:** “28800000" **Acceptable Values:** *integer as a string* — (any valid positive integer value)

---

#### Only Send Over Wifi

**Description:** Controls whether events are sent when wifi is unavailable. **String Literal:** wt_dc_only_send_over_wifi **Constant Name:** kWTConfigOnlySendOverWifi **Default Value:** “false" **Acceptable Values:** *boolean as a string* — "true” or “false”

---

#### Report Location Enabled

**Description:** When enabled (and CoreLocation services in the application are enabled), sends geo location coordinates with every event. The application must be configured with CoreLocation authorization. The SDK will not request authorization unilaterally. It will only use this information if it is already authorized in your application. **String Literal:** wt_dc_report_location_enabled **Constant Name:** kWTConfigReportLocationEnabled **Default Value:** “false" **Acceptable Values:** *boolean as a string* — "true” or “false”

---

#### Send Interval Milliseconds

**Description:** Time (in milliseconds) between stored events being transmitted to the Webtrends data collection servers. If no events are queued, nothing is transmitted and a new send event is scheduled. **String Literal:** dc_send_interval_millis **Constant Name:** kWTConfigSendIntervalMilliseconds **Default Value:** “600000" **Acceptable Values:** *integer as a string* — (any valid positive integer value)

---

#### Send Screen View Events with Automatic Activity View Events

**Description:** Enable/Disable sending a screen View event along with every automatic activity event. This only applies when automatic events are enabled. This may be enabled/disabled manually or by RCS. **String Literal:** wt_dc_send_screen_view_with_activity_view_enabled **Constant Name:** kWTConfigSendScreenViewWithActivityViewEnabled **Default Value:** “false" **Acceptable Values:** *boolean as a string* — "true” or “false”

---

#### Session Timeout Milliseconds

**Description:** Controls the maximum amount of time (in milliseconds) since the last event before forcing a new session to start. **String Literal:** wt_dc_session_timeout_millis **Constant Name:** kWTConfigSessionTimeoutMilliseconds Default Value: “1800000" **Acceptable Values:** *integer as a string* — (any valid positive integer value)

---

#### Timezone

**Description:** The timezone that will be used to calculate session information. This setting is only used to establish when a new day starts/ends. Generally, this should be set to the timezone that will be used for session reporting. It is NOT NECESSARILY the timezone that the device is operating in. **String Literal:** wt_dc_timezone **Constant Name:** kWTConfigTimezone **Default Value:** “-8” (Pacific Time) **Acceptable Values:** *integer as a string* — (between “-12” and “12”, inclusive)

---

#### Webtrends SDK Enabled

**Description:** Enable/Disable the Webtrends Data Collector SDK **String Literal:** wt_dc_enabled **Constant Name:** kWTConfigEnabled **Default Value:** “true" **Acceptable Values:** *boolean as a string* — "true” or “false"

          Important Note:

          

If this config setting is set to ‘false’, then the SDK will no longer collect events, store events, or send events. Effectively, setting this to ‘false’ renders the entire SDK inoperable.

---
