/// <summary> /// Submits the poll tracking. /// </summary> /// <param name="pollItem">The poll item.</param> /// <param name="optionItem">The option item.</param> private static void SubmitPollTracking(Item pollItem, Item optionItem) { TrackingFieldProcessor processor = new TrackingFieldProcessor(); processor.Process(pollItem); processor.Process(optionItem); }
public virtual void ApplyTracking(Item item) { if (item == null) { return; } var processor = new TrackingFieldProcessor(); processor.Process(item); }
public void ProcessTracking(Item item) { if (item == null) { return; } try { TrackingFieldProcessor.Process(item); } catch (ItemNotFoundException ex) { this.logging.Error(this.GetType(), $"Could not track item '{item.ID}'", ex); } }
/// <summary> /// Rates the page. /// </summary> /* private void RatePage() { Item item = Sitecore.Context.Item; if (item != null) { lock (Locking) { string key = "rate_" + item.ID; if (Session[key] != null) { VoteMembers voteMembers = Session[key] as VoteMembers; if (voteMembers != null && !voteMembers.AlreadyVoted) { NicamHelper.VoteForPage(voteMembers.ID, voteMembers.Voce, voteMembers.Mark); voteMembers.AlreadyVoted = true; } } } } }*/ /// <summary> /// Tracks the generic personalization spot. /// </summary> private void TrackGenericPersonalizationSpot() { char[] symbols = { ',' }; string spotItemId = NicamHelper.SafeRequest("GenericPersonalizationSpotId").TrimEnd(symbols); Item spotItem = Sitecore.Context.Database.Items[spotItemId]; //Perform tracking of spot item TrackingFieldProcessor processor = new TrackingFieldProcessor(); processor.Process(spotItem); string gpSpotEvent = NicamHelper.SafeRequest("GenericPersonalizationSpotGoal").TrimEnd(symbols); gpSpotEvent = gpSpotEvent.Replace('+', ' '); gpSpotEvent = gpSpotEvent.Replace("%2b", " "); if (gpSpotEvent != string.Empty) { var pedata = new PageEventData(gpSpotEvent); Tracker.CurrentPage.Register(pedata); } string redirectUrl = NicamHelper.SafeRequest("GenericPersonalizationSpotRedirectUrl").TrimEnd(symbols); Response.Redirect(redirectUrl); }