Campaign tracking in Mapp Intelligence enables you to analyze how visitors reach your website, whether through paid advertising, newsletters, or other marketing activities.
In a broader sense, campaigns represent all entry sources that bring users to your site.
However, this section focuses on campaigns that can be technically tracked, meaning those that include a media code (a specific URL parameter used to identify the campaign source).
Typical examples include:
Email newsletters (wt_mc=newsletter.2025.spring)
Google Ads or display banners (mc=display.30off.blue)
Social media promotions or affiliate links (utm_source=facebook&utm_campaign=summer_sale)
Before any campaign data can be tracked, a campaign setup must exist in Mapp Q3 under Configuration > Marketing Configuration. This setup defines how media codes, ad media, and campaign parameters are structured and recognized in Mapp Intelligence. Without this configuration, no campaign information is collected, even if URLs contain tracking parameters. For more background on campaign concepts, see Campaign Configuration in the documentation.
Campaign ID
The campaign ID uniquely identifies each campaign tracked in Mapp Intelligence.
It consists of the media code name and its value, separated by "%3D" (URL-encoded =).
Example:
wt_mc%3Dnewsletter.2025.springThis ID format ensures consistent attribution between the tracked visit and the campaign setup in Mapp Intelligence.
Media Code
The media code defines the URL parameter used for campaign identification, such as mc, wt_mc, or utm_campaign.
Specifying the correct parameter name ensures that campaign entries are correctly attributed to their sources. Without this configuration, campaign tracking accuracy may be reduced, for example if firewalls or browsers remove unknown parameters. This configuration only needs to be implemented on target or landing pages that serve as campaign entry points.
Parameters
Campaign parameters provide additional details about an advertising medium, such as:
The position of a clicked link within a newsletter
The banner variant in a display campaign
The creative or language version of an ad
They can be defined either in the campaign configuration or directly in the page configuration.
If the same parameter is defined in both places, the page configuration takes precedence and overwrites the URL parameter.
Example:
www.website.com?wt_mc=Newsletter_2025_10&wt_cc1=link1Campaign ID from the Request URL
The library determines the campaign ID as follows:
An ID set explicitly with the constructor or
setIdis always used.Without an explicit ID, the library reads the campaign from the request URL configured in the library (see Integration and Configuration). For every media code name set with
setMediaCode(defaultmcandwt_mc) that has a value in the URL,<name>%3D<value>is added. Several campaign IDs are joined with;, for example?mc=abc&wt_mc=defbecomesmc%3Dabc;wt_mc%3Ddef.If neither yields an ID, no campaign ID is sent.
The library reads only the media codes from the request URL. Campaign parameters in the URL (such as wt_cc1) are not read; transmit them with setParameter.
Once per Session
With setOncePerSession, a campaign is transmitted only once per session:
The library reads the campaigns already transmitted from the cookie
wtstp_tccof the incoming request. The request cookies must be available to the library (see Integration and Configuration).The check works per campaign: campaigns already transmitted are removed from the ID, new ones are sent and remembered. If no new campaign remains, the campaign ID
ignore%3Dignoreis sent instead.This also applies to an ID set explicitly with
setId.
Return the updated cookie to the browser: getTransmittedCampaignsCookie returns it after a new campaign was transmitted. Add it to your HTTP response, otherwise once per session cannot work across requests (see Classes).
Method | Description | Where to configure * | Where to analyze |
|---|---|---|---|
constructor | Initializes a campaign object. The campaign ID can be set via setId. | – | Marketing > Campaigns > Advertising Media |
setId | Defines the campaign ID in the format mediaCodeName%3DmediaCodeValue (URL-encoded =), e.g. wt_mc%3Dnewsletter.2025.spring. | – | Marketing > Campaigns > Advertising Media |
setMediaCode | Defines the URL parameters (media codes) from which the campaign ID is read when no ID is set explicitly, e.g. | – | Marketing > Campaigns > Advertising Media |
setOncePerSession | Tracks a campaign only once per session: a campaign that was already transmitted in this session is not sent again. | – | Marketing > Campaigns > Advertising Media |
setParameter | Tracks additional campaign-specific information that always refers to an advertising medium. | CP > Own Configuration | – |
* Configuration Path Abbreviations:
CP = Mapp Q3 > Configuration > Custom Parameters > Campaign Parameters > Preconfigured > …
Generated request parameters
Method | Request parameter | Constant |
|---|---|---|
constructor / setId / setMediaCode / setOncePerSession |
|
|
– |
|
|
setParameter |
|
|
Note
Values that are empty or exactly
0,0.0,falseor{}are not transmitted. For example, a campaign parameter with the value0orfalseis not sent. To transmit such a value, send the request with a parameter map (see Request Parameters).
constructor
/**
* MappIntelligenceCampaign constructor.
* @param string $id
*/
$campaignData = new MappIntelligenceCampaign($id);setId
/**
* @param string $id
* @return $this
*/
$campaignData->setId($id);setMediaCode
/**
* @param array $mediaCode
* @return $this
*/
$campaignData->setMediaCode($mediaCode);setOncePerSession
/**
* @param bool $oncePerSession
* @return $this
*/
$campaignData->setOncePerSession($oncePerSession);getId, getMediaCode, isOncePerSession
Return the configured values.
setParameter
/**
* @param string $id
* @param string $value
* @return $this
*/
$campaignData->setParameter($id, $value);$campaignData = new MappIntelligenceCampaign();
$campaignData
->setId('wt_mc%3Dfoo.bar.2')
->setMediaCode(array('wt_mc', 'mc'))
->setOncePerSession(true)
->setParameter(1, 'parameter 1')
->setParameter(2, 'parameter 2');
$mappIntelligence = MappIntelligence::getInstance();
$mappIntelligence->track((new MappIntelligenceDataMap())->campaign($campaignData));