public override void Process(ProcessItemArgs args) { Assert.ArgumentNotNull((object)args, nameof(args)); Assert.ArgumentNotNull((object)args.Interaction, nameof(args.Interaction)); Assert.IsNotNull((object)args.Interaction.CurrentPage, "The current page of the specified interaction is not initialized."); var tagNames = GetTagNames(Sitecore.Context.Item); var pageData = new Sitecore.Analytics.Data.PageEventData("Taxonomy Page View", Configuration.ConfigSettings.TaxonomyPageViewEventId) { Data = tagNames, Text = "Viewed page tagged with taxonomy", DataKey = "TagNames" }; args.Interaction.CurrentPage.Register(pageData); }
public override void Process(ProcessItemArgs args) { Assert.ArgumentNotNull((object)args, "args"); var obj = Context.Item; if (obj == null) return; var parentItem = obj.Database.GetItem(Constants.ProcessItemRules); if (parentItem == null) return; var rules = RuleFactory.GetRules<RuleContext>(parentItem, "Rule"); if (rules == null) return; var ruleContext = new RuleContext() { Item = obj }; rules.Run(ruleContext); }
public override void Process(ProcessItemArgs args) { Assert.ArgumentNotNull(args, "args"); var item = Context.Item; var taxonomyField = (MultilistField)item.Fields[ConfigSettings.TaxonomyField]; if (taxonomyField != null) { foreach (var tag in taxonomyField.GetItems()) { // assign tag Profiles to the context item TrackingField tagTrackingField = GetTagProfile(tag); if (tagTrackingField != null) { args.TrackingParameters.Add(tagTrackingField); } } } }
public override void Process(ProcessItemArgs args) { if (!Context.Site.ProfileMappingEnabled()) { return; } foreach (var profileMapSet in GetProfileMapsSets()) { var set = Context.Database.GetItem(profileMapSet.Key); if (set == null) { continue; } var enabled = ((CheckboxField)set.Fields[Templates.ProfileMapSet.Fields.Enabled]).Checked; if (!enabled) { continue; } var matchSingle = ((CheckboxField)set.Fields[Templates.ProfileMapSet.Fields.MatchSingle]).Checked; foreach (var profileMap in profileMapSet) { var trackingField = new ProfileMapItem(profileMap).EvaluateProfileMap(args.Item); if (trackingField != null) { args.TrackingParameters.Add(trackingField); if (matchSingle) { break; } } } } }