---
title: Example - Creating campaigns
related:
  - https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/tracking-campaigns/managing-campaigns.md
  - https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/tracking-campaigns/evaluating-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.

The following example demonstrates how to work with [campaigns](https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/tracking-campaigns.md) on the sample Corporate site.

## Creating the campaigns

By default, the Corporate Site contains a single campaign name _Sample campaign_. Create two additional campaigns.

1. Open the **Campaigns** application.
2. Switch to the **Campaigns** tab.
3. Click **New campaign** and fill in the following properties:

   - **Display name**: Banner campaign
   - **Code name**: Banner1
4. Click **Save**.
5. Return to the campaign list and add a third campaign with the following names:

   - **Display name**: E‑mail marketing
   - **Code name**: Emails

 Now that the campaign tracking objects are prepared, you need to ensure that the system correctly identifies visitors who access the website through the given campaigns.

## Identifying campaigns through URL parameters

The default name of the campaign tracking URL parameter is **campaign**.

> **Tip:** You can change the name of the campaign parameter in **Settings -> On‑line marketing -> Web analytics** through the **Campaign tracking URL parameter** setting.

1. Open a new tab in your browser and copy the URL of your site's Home page into the address bar.
2. Add the campaign tracking parameter to the URL and set its value to **samplecampaign** (the name of the default campaign):\
   _http://localhost/Kentico/Home.aspx?campaign=samplecampaign_
   - Adjust the URL according to the domain of your website.
   - You may also need to **Close** the preview mode of the page to get to the actual live site.

> **Info:** The Home page opens as usual, but the system recognizes that you have arrived via a campaign.

3. Scroll down to the bottom of the page and click the **Examples** link under the **Where to learn more?** section.
4. Use the menu on the left to reach **On**\*\*‑\*\***line marketing -> Optimization -> Conversion page**, which logs a sample [conversion](https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/logging-conversions-on-your-website.md).

   - Because the Sample campaign is currently active in your browser, the system records the conversion in the campaign's statistics.
   - You can try reloading the page several times to log multiple conversions.

In a real‑world scenario, you would need to ensure that all links to your website placed in the given campaign's marketing materials contain the tracking parameter with the name of the appropriate campaign object as the value.

## Using page-specific campaigns

Create a page to serve as a campaign landing page:

1. Log back in to the Kentico administration interface.
2. Open the **Pages** application.
3. Select the **Special Pages** folder in the content tree and create a **New** () page named _Landing page_.

   - You can choose the **Create a blank** page option in the template selection dialog, since the content of the page is not important for the purposes of this example.
4. Switch to the **Analytics -> Settings** tab of the new page.
5. Click **Select** next to the **Track campaign** field and choose **Banner campaign**.
6. Click **Save**.
7. Open this new page on the live site (you can access it through its URL: _\<domain>/SpecialPages/Landing-Page.aspx_).

   - The _Banner campaign_ becomes active, replacing the previously assigned campaign.
8. Navigate to **Examples -> On‑line marketing -> Optimization -> Conversion page** again to log a conversion for the second campaign.

## Creating page aliases for campaigns

Add a campaign alias to the website's Home page:

1. In the **Pages** application, select the **Home** page in the content tree.
2. Go to **Properties -> URLs**.
3. Click **Add new alias**.
4. Configure the alias's settings as shown below:

   - **Path type**: Standard URL or wildcard
   - **Path or pattern**: /EmailCampaign/Home
   - **Track campaign**: select the _E_\*‑\*_mail marketing_ campaign
5. Click **Save**.
6. Open the site's Home page through the URL of the page alias (_\<domain>/EmailCampaign/Home.aspx_).

   - This overrides the previous campaign and you can visit the sample **Conversion page** again.

Read [Evaluating campaigns](https://docs.kentico.com/k81/on-line-marketing-features/web-analytics/tracking-campaigns/evaluating-campaigns.md) to learn how to view the results of the sample campaigns. Keep in mind that this sample scenario only serves to quickly demonstrate the functionality of campaigns. In the case of a real campaign, visitors do not need to enter URLs manually, but simply follow the appropriate links.
