Sitecore 7 Analytics increase engagement value programatically -
I am working to implement Cycorecore DMS in 7.2 and I have been a main issue for which I find it difficult Have time to get an answer I have some goals and events set up and I am trying to set one through the Analytics API. The event is being logged after the page event ID is set in the database, but what I am trying to add adds the engagement value to the current visit / visitor.
I want to update the value field in the Visitors database for the current visit. What I'm currently doing:
Public static zero trigger target (id target) {if (Tracker.IsActive & Tracker.CurrentPage! = Null) {Sitecore.Data.Items. Item TargetTotrigger = Siter.Contax.DatabaseBattle (target); If (goalToTrigger! = Null) {Sitecore.Analytics.Data.Items.PageEventItem reg = New Sitecore.Analytics.Data.Items.PageEventItem (goalToTrigger); Sitecore.Analytics.Data.DataAccess.DataSets.VisitorDataSet.PageEventsRow eventData = tracker.CurrentPage.Register (reg); EventData.Data = goalToTrigger ["Description"]; Tracker.Submit (); }}} This page updates the databases correctly, considering that the event has been turned on, but this widget adds an engagement value to the database, no matter how many engagements Issue is assigned Goad which is being triggered
I have tried various ways of getting the API to update this area, but have not done anything for me till now. Here I have given a bunch of different things:
Tracker Current visit BENGMENT (); Tracker.CurrentVisit.Value + = 3; // Create a new PageEventItem class to get the Price View field ID instead of hardcoding Tracker.CurrentVisit.AcceptChanges (); Tracker.CurrentVisit.EndEdit (); Tracker.CurrentVisit.Load (); Tracker.CurrentPage.BeginEdit (); Tracker.CurrentPage.Visit.Value + = 3; Tracker.CurrentPage.AcceptChanges (); Tracker.CurrentPage.EndEdit (); Tracker.Visitor.CurrentVisit.BeginEdit (); Tracker Visitor Current waze Value = 3; Tracker.Visitor.CurrentVisit.AcceptChanges (); Tracker.Visitor.CurrentVisit.EndEdit (); Tracker.Visitor.CurrentVisit.Load (); Tracker.CurrentVisit.CurrentPage.Visit.BeginEdit (); Tracker.CurrentVisit.CurrentPage.Visit.Value + = 3; Tracker.CurrentVisit.CurrentPage.Visit.AcceptChanges (); Tracker.CurrentVisit.CurrentPage.Visit.EndEdit (); Tracker.CurrentVisit.CurrentPage.Visit.Load (); Tracker.CurrentVisit.CurrentPage.VisitorsRow.BeginEdit (); Tracker Current visit Custom Page VisitorRo.value + = 3; Tracker.CurrentVisit.CurrentPage.VisitorsRow.AcceptChanges (); Tracker.CurrentVisit.CurrentPage.VisitorsRow.EndEdit (); I used different combinations to use the AcceptChanges () and BeginEdit () EndEdit () and Load () functions, because I'm not quite sure what they do each , But either of them do not update the value field.
I am trying to avoid querying custom SQL to update this field, I am trying to understand that it is built in the built-in sitcom analytics API. Can someone help me understand how can I update this area?
Waiting enough to see the value written for the trip?
if (Tracker.IsActive) {Tracker.CurrentVisit.Value + = 3; } There is no need to get started, accepted changes, end edit etc.
Comments
Post a Comment