--- title: "Campaigns" slug: "intelligence-smart-pixel-campaigns" updated: 2025-03-27T11:08:19Z published: 2025-03-27T11:08:19Z canonical: "docs.mapp.com/intelligence-smart-pixel-campaigns" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Campaigns ## 1 Overview This page provides a comprehensive guide on how to track and configure campaign-related data in Mapp Intelligence. It details the configurable properties, analysis options, and implementation via JavaScript methods. Campaign tracking must first be configured in Mapp Intelligence under Mapp Q3 *>* *Configuration > Marketing Configuration*. Without this setup, no campaign information (such as campaign clicks) will be collected. Campaign tracking relies on specific parameters—so-called **media codes**—that are added to the target URLs of campaigns. These media codes identify and assign campaign clicks. In addition, **campaign parameters** can be used to track further metadata. For detailed information on setting up campaigns, see the dedicated [Campaign Documentation](/v1/docs/analyses-31-campaign-configuration). --- ## 2 Configurable Properties The following table outlines all supported campaign properties, their descriptions, request parameters, and where to analyze them in the UI.     | Property | Description | Data Type | Request Parameter | | --- | --- | --- | --- | | id | Campaign ID consisting of a media code name and its value (e.g. `wt_mc=newsletter.march`). The combined value must be URL-encoded using `%3D`. The value is analyzed in *Marketing > Campaigns > Advertising Media* | String | `mc` | | mediaCode | Identifies the name of the URL parameter used as the media code (e.g. `wt_mc`). Using this improves measurement accuracy. | String[] | – | | oncePerSession | Tracks a campaign only once per visit (session). Additional campaign clicks within the same visit are ignored. | Boolean | – | | parameter | Custom parameters to describe the advertising medium (e.g. link position). Can be transmitted via URL or configured manually. | Object | `cc[ID]` | ### 2.1 Campaign ID The campaign ID (`id`) is constructed by combining the name of the media code parameter (e.g. `wt_mc`) and its value (e.g. `newsletter.march`) into one encoded string: `wt_mc%3Dnewsletter.march`. Example: ```http https://www.example.com/index.html?wt_mc=newsletter.march ``` ### 2.2 Media Code Specifying the media code name (`wt_mc`) explicitly in the tracking setup ensures that Mapp Intelligence knows which parameter to use to assign campaign clicks. If this is not set, tracking accuracy may be reduced—especially when firewalls block referrers. The configuration only needs to be added to landing pages. ### 2.3 Once per Session This option prevents multiple evaluations of the same campaign within a single visit (session). If the same user clicks on a campaign link multiple times during the same visit, only the first interaction will be tracked. ### 2.4 Campaign Parameters Campaign parameters allow tracking of additional metadata about the advertising medium—such as the position of a link in a newsletter. These can be defined in the URL or passed manually in the pixel setup. Example: ```http https://www.example.com/index.html?wt_mc=newsletter.march&wt_cc1=topLink ``` If both a URL parameter and a manual setup for the same ID exist, the manual configuration takes precedence. --- # 3 Objects and Methods Mapp Intelligence provides two tracking objects for campaigns: - `data`: Use this object to configure the entire campaign setup. - `parameter`: Use this object to manage campaign parameters independently. Each object supports four methods: | **Method** | **Description** | | --- | --- | | `set()` | Overwrites all existing values. | | `add()` | Adds or updates values. Existing values remain unchanged unless replaced. | | `get()` | Returns the current configuration. | | `remove()` | Deletes the entire configuration or selected values. | ### 3.1 data – Full Campaign Configuration SetAddGetRemove ```javascript /** * @param {{ *      id: string, *      [mediaCode=[mc,wt_mc]]: string | string[], *      [oncePerSession=false]: boolean, *      [parameter={}]: {[number]: string} * }} data * * @returns {wtSmart.campaign.data} */ wtSmart.campaign.data.set(data); ``` ```javascript /** * @param {{ *      [id]: string, *      [mediaCode]: string | string[], *      [oncePerSession]: boolean, *      [parameter]: {[number]: string} * }} data * * @returns {wtSmart.campaign.data} */ wtSmart.campaign.data.add(data); ``` ```javascript /** * @returns {{ *      id: string, *      mediaCode: string[], *      oncePerSession: boolean, *      parameter: {[number]: string} * }} */ wtSmart.campaign.data.get(); ``` ```javascript /** * @param {string[]} [removeList] * * @returns {wtSmart.campaign.data} */ wtSmart.campaign.data.remove(removeList); ``` **Example** ```javascript // set campaign data wtSmart.campaign.data.set({ id: 'wt_mc%3Den.internal.newsletter.2017.05', parameter: {        1: 'Newsletter 123'    } }); // add campaign data wtSmart.campaign.data.add({ mediaCode: 'wt_ga', oncePerSession: false }); // get campaign data var data = wtSmart.campaign.data.get();   // remove all campaign data wtSmart.campaign.data.remove(); // remove only id from campaign data wtSmart.campaign.data.remove(['id']); ``` ### 3.2 parameter – Custom Campaign Parameters SetAddGetRemove ```javascript /** * @param {{[number]: string}} data * * @returns {wtSmart.campaign.parameter} */ wtSmart.campaign.parameter.set(data); ``` ```javascript /** * @param {{[number]: string}} data * * @returns {wtSmart.campaign.parameter} */ wtSmart.campaign.parameter.add(data); ``` ```javascript /** * @returns {{[number]: string}} */ wtSmart.campaign.parameter.get(); ``` ```javascript /** * @param {number[]} [removeList] * * @returns {wtSmart.campaign.parameter} */ wtSmart.campaign.parameter.remove(removeList); ``` **Example** ```javascript // set campaign parameter wtSmart.campaign.parameter.set({    1: 'en', 5: 'newsletter' }); // add campaign parameter wtSmart.campaign.parameter.add({    1: 'de',    7: 'foo.bar' }); // get campaign parameter var data = wtSmart.campaign.parameter.get();   // remove all campaign parameter wtSmart.campaign.parameter.remove(); // remove only campaign parameter 7 wtSmart.campaign.parameter.remove([7]); ``` --- ## 4 Code Generator Use the code generator to create individual tracking code that can be directly integrated into your website. [Embedded content](https://static.webtrekk.com/pixel/wtsmart-gui/data/campaign/?nohelp=1) The legacy configuration interface for Mapp Intelligence. A **Request Parameter** displays the name of the parameter included in a tracking request. This information is crucial for debugging purposes (e.g., via **Mapp Cloud Debugger**), allowing you to verify the data transmitted to Mapp and understand how it is recorded.