Created
July 11, 2014 07:25
-
-
Save lowedown/8f78d575c2d7fee45ed0 to your computer and use it in GitHub Desktop.
Hook for the triggerCampaign pipeline to always associate a campaign to a visit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AssociateCampaignToVisit : TriggerCampaignProcessor | |
{ | |
public override void Process(TriggerCampaignArgs args) | |
{ | |
Assert.ArgumentNotNull((object)args, "args"); | |
// Always associate the campaign to the current visit when triggered | |
Sitecore.Analytics.Tracker.CurrentVisit.CampaignId = args.Definition.ID.ToGuid(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment