--- title: "Campaigns" slug: "set-tracking-data-campaign" updated: 2025-03-27T11:20:49Z published: 2025-03-27T11:20:49Z canonical: "docs.mapp.com/set-tracking-data-campaign" --- > ## 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 Implementation Examples > [!NOTE] > If you do not have [automatic page tracking](/v1/docs/installation-and-integration) enabled, invoke the [track](/v1/docs/send-tracking-data-track) method after adding all relevant tracking information. ```javascript import { Component } from '@angular/core'; import { WebtrekkSmartPixelAngular } from '@webtrekk-smart-pixel/angular'; @Component({    template: `
[ ... ]
` }) export class ExampleComponent {    constructor(private pixel: WebtrekkSmartPixelAngular) {        this.pixel.campaign({            id: "wt_mc%3Den.internal.newsletter.2017.05",            mediaCode: ["mc", "wt_mc"],            oncePerSession: false,            parameter: {1: "Newsletter 123"}        });    } } ``` > [!NOTE] > Please add `WebtrekkSmartPixelModule` to your root NgModule and configure the options before using directives. > [!NOTE] > If you do not have [automatic page tracking](/v1/docs/installation-and-integration) enabled, invoke the [track](/v1/docs/send-tracking-data-track) method after adding all relevant tracking information. ```javascript import { Component } from '@angular/core'; @Component({    template: `
` }) export class ExampleComponent {    webtrekkData = {        id: 'wt_mc%3Dfoo.bar',        mediaCode: ['wt_mc', 'mc'],        oncePerSession: true,        parameter: {1: 'foo', 2: 'bar'}    } } ``` 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.