CSharpAnalytics.UrchinActivityExtensions.TrackCampaign C# (CSharp) Method

TrackCampaign() public static method

Capture the details of a campaign that will be sent to analytics.
public static TrackCampaign ( this analyticsClient, string source, string name = null, string medium = null, string term = null, string content = null ) : void
analyticsClient this UrchinAnalyticsClient object with queue and configuration set-up.
source string Source of the campaign.
name string Optional name of the campaign.
medium string Optional type of campaign.
term string Optional keyword terms for this campaign.
content string Optional content such as the specific link or content item for this campaign.
return void
        public static void TrackCampaign(this UrchinAnalyticsClient analyticsClient, string source, string name = null, string medium = null, string term = null, string content = null)
        {
            if (analyticsClient == null) throw new ArgumentNullException("analyticsClient");
            analyticsClient.Track(new CampaignActivity(source) { Name = name, Medium = medium, Term = term, Content = content });
        }