Click or drag to resize
CampaignServiceCampaignCode Property
Gets/sets the visitor's campaign from/to a persistent storage.

Namespace: CMS.WebAnalytics
Assembly: CMS.WebAnalytics (in CMS.WebAnalytics.dll) Version: 10.0.0
Syntax
C#
public string CampaignCode { get; }

Property Value

Type: String

Implements

ICampaignServiceCampaignCode
Examples
Following example shows how to use the CampaignCode property in the case CookieCampaignPersistentStorage is used as implementation of ICampaignPersistentStorage.
var campaignService = new CampaignService();

...

// for request with cookie Campaign: test_campaign returns test_campaign
// for request without cookies returns null
public string GetCampaignCode() 
{
    return campaignService.CampaignCode;
}
See Also