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