Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sitecore rule engine action to register a goal
public class RegisterGoalAction<T> : RuleAction<T> where T : RuleContext
public ID GoalId { get; set; }
public override void Apply(T ruleContext)
if (!Tracker.IsActive || Tracker.Current.CurrentPage == null) return;
var goal = (PageEventItem)Context.Database.GetItem(GoalId);
if (goal != null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.