---
title: "新しいメールキャンペーンアイテムのデフォルトチャネルID"
slug: "the-default-channel-id-of-new-email-campaign-items"
abstract: "EXMは新しいキャンペーン項目にチャネルIDを追加し、ユーザーがメール内のリンクをクリックした際のキャンペーンを追跡できるようにします。"
---
# 新しいメールキャンペーンアイテムのデフォルトチャネルID

メールキャンペーンを送信すると、Email Experience Managerが新しいメールキャンペーン項目を作成し、そのキャンペーン項目にチャネルIDを追加します。

デフォルトではチャネルはメールマーケティングです。Sitecore.EmailExperience.Core.configファイルのCampaignClassification.Channel設定でデフォルトのチャネルIDを変更できます。

<!--The Channel Id associated with the campaign-->
<setting name="CampaignClassification.Channel" value="{DDAFB85B-1511-48B8-9374-2A8A1F371645}" />

この設定の値については、使いたいチャネルアイテムのアイテムIDをデフォルトとして使います。

![Email Marketing channel showing the default channel ID.](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/exm/91/email-experience-manager/images/708FECAE7A064B9782DD5C630445F0C5.png)

受信者がメール内のリンクをクリックすると、Sitecoreはキャンペーン項目内のチャンネルIDを使ってキャンペーンを追跡します。

![Classification section for a New Campaign showing the channel ID.](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/exm/91/email-experience-manager/images/C5E4FB4870C44EDABCF55804A2B7A964.png)

キャンペーン項目のチャンネルIDは、Sitecore Taxonomy APIを使って読み取ることができます:

IDefinitionManager<ICampaignActivityDefinition> campaignDefinitionManager = ServiceLocator.ServiceProvider.GetService<IDefinitionManager<ICampaignActivityDefinition>>();
var campaignActivity = campaignDefinitionManager.Get(campaignId, CultureInfo.InvariantCulture);
var channelId = campaignActivity.ChannelUri.TaxonId;