ICampaignServiceSetCampaign Method |
Namespace: CMS.WebAnalytics
void SetCampaign( string campaignCode, string siteName, string source = null )
var campaignService = new CampaignService(); ... // stores myCampaign to the <see cref="P:CMS.WebAnalytics.ICampaignService.CampaignCode" /> and mySource to the <see cref="P:CMS.WebAnalytics.ICampaignService.CampaignSourceName" /> campaignService.SetCampaign("myCampaign", "mySite", "mySource"); ... // for all following requests of the same visitor // returns myCampaign public string GetCampaignCode() { return campaignService.CampaignCode; } // returns mySource public string GetSourceName() { return campaignService.CampaignSourceName; }