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

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

Property Value

Type: String
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