---
title: Managing campaigns
related:
  - https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/logging-conversions-on-your-website.md
  - https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/tracking-campaigns/example-creating-campaigns.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

> **Info:** **Kentico EMS required**
>
> Features described on this page require the **Kentico EMS** license.

To manage your website's marketing campaigns, open the **Campaigns** application and select the **Campaigns** tab.

To create new campaigns:

1. Click **New campaign**.
2. Fill in the following properties:

   - **Display name** - the name of the campaign displayed in the administration interface (in campaign lists and reports).
   - **Code name** - serves as a unique identifier for the campaign. It is also stored as the value of the _Campaign_ browser cookie used to identify visitors who came to the website through the given campaign.
   - **Description** - can be used to enter a text description for the campaign in order to give information about its purpose, goals, etc.
   - **Open from/to** - sets the time interval during which the campaign is active. Use the _Calendar_ button () to select an exact date and time.
   - **Enabled** - you can use this property to manually start or stop tracking of the campaign. The system does not log visitor statistics and actions for disabled campaigns.
3. Click **Save**.

The **General** tab of the campaign's editing interface open.

![Editing a campaign on the General tab](https://docs.kentico.com/docsassets/k81/managing-campaigns/Campaign_General.png "Editing a campaign on the General tab")

You can modify the fields listed above, as well as the advanced campaign settings.

- The **Impressions** and **Total cost** values can be used to help evaluate the campaign and calculate its goals (see [Evaluating campaigns](https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/tracking-campaigns/evaluating-campaigns.md)).
- The **Condition** field allows you to specify a [macro condition](https://docs.kentico.com/k81/macro-expressions/writing-macro-conditions.md) that must be fulfilled in order for visitors to be included in the campaign. Click **Edit** to [build conditions](https://docs.kentico.com/k81/macro-expressions/writing-macro-conditions/building-conditions-using-macro-rules.md) using text-based macro rules.

  > **Info:** **Campaign condition example**
  >
  > ```text
  >
  > Cookies.Campaign != "banner1"
  > ```
  >
  > This sample condition checks the value of the _Campaign_ cookie and prevents the campaign from being assigned to visitors who are already being tracked by a different campaign named **banner1**.
  >
  > Refer to the [Macro expressions](https://docs.kentico.com/k81/macro-expressions.md) chapter for details about available macro options and syntax.

On the **Conversions** tab, you can configure which [conversions](https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/logging-conversions-on-your-website.md) the campaign tracks. There are two possible options:

- **All conversions will be tracked for the campaign** - all conversion hits logged on the entire website are included in the campaign's statistics.
- **Only the selected conversions will be tracked for the campaign** - allows you to limit which conversions the campaign tracks. You can assign specific conversions to the campaign by clicking _Add conversions_ and choosing from the list in the displayed dialog.

In both cases, the system only logs campaign conversions for visitors who arrive on the website as a result of the given campaign.

## Configuring campaign tracking

You can use three different approaches to identify visitors who access the website through a marketing campaign:

- [URL parameters](#url-parameters)
- [Page-specific campaigns](#page-specific-campaigns)
- [Page aliases for campaigns](#page-aliases-for-campaigns)

> **Note:** The campaign tracking methods are listed in the order of their priority. So if a campaign is set for a specific page, but the page is accessed via a URL containing a tracking parameter, the system assigns the campaign specified via the parameter.

### URL parameters

Utilize a URL query string parameter to indicate that the traffic source is a campaign.

1. Open the **Settings** application.
2. Select the **On‑line marketing -> Web analytics** category.
3. Enter the name of the URL parameter into the website's **Campaign tracking URL parameter** setting.
4. Click **Save**.
5. Ensure that all link URLs used in the campaign's marketing materials contain the parameter, with the name of the appropriate campaign as the value. For example:

   - http://www.mywebsite.com/Home.aspx?campaign=banner1

   - http://www.mywebsite.com/News.aspx?campaign=newsletterJune

This type of campaign tracking is not limited to a specific page and works for all pages on the website.

### Page-specific campaigns

You can configure pages to behave as campaign landing pages. When visitors view such a page, the system automatically assigns the specified campaign. A visit is logged for the campaign every time the page is requested.

> **Note:** **Note**: To ensure accurate campaign tracking, it is recommended to create a special page that is not available in the website's standard navigation.

To create a campaign landing page:

1. Open the **Pages** application.
2. Select the page in the content tree.
3. Switch to the **Analytics -> Settings** tab.
4. Type the name of your campaign into the **Track campaign** field.

   - Click **Select** to choose from a list of existing campaign objects available for the website.
   - You can use **Edit** and **New** to manage campaigns directly from the dialog.
5. Click **Save**.
6. Direct all campaign links to the URL of the landing page.

The system assigns the campaign to all users who view the page. Repeated page views by the same user are logged as separate campaign visits.

### Page aliases for campaigns

You can define campaign tracking for a page's specific [page alias](https://docs.kentico.com/k81/configuring-kentico/configuring-page-urls/setting-page-aliases.md). This approach is useful if you need the campaign to link visitors to an easily accessible page, but want to avoid using a query string parameter.

1. Open the **Pages** application.
2. Select the page in the content tree.
3. Go to **Properties -> URLs**.
4. Click **Add new alias**.
5. Configure the alias settings:
   - Select **Standard URL or wildcard**.
   - Enter a suitable path into the **Path or pattern** field.
   - Specify the name of the campaign in the **Track campaign** property.

![Tracking a campaign through a document alias](https://docs.kentico.com/docsassets/k81/managing-campaigns/Campaign_Alias.png "Tracking a campaign through a document alias")

6. Click **Save**.
7. Use the URL of the alias in the campaign's links, for example: _http://www.mywebsite.com/Campaigns/Home.aspx_

The system assigns the campaign to visitors who access the page through the exact page alias.

## Enabling automatic campaign creation

When a visitor comes to the website through an undefined campaign (typically specified via a tracking URL parameter), the system ignores the campaign by default.

Administrators with access to the application's **web.config** file can change this behavior by adding the following key to the **/configuration/appSettings** section:

```html

 <add key="CMSEnableAutomaticCampaignCreate" value="true" />

```

This ensures that unknown campaigns are automatically added to the list of campaigns for the given website. Campaigns created this way are enabled and have an unlimited time interval by default.
