「TriggerEvent」である6.4のOMSにあった非推奨のメソッドを代用しようとしています。次のコードで次のエラーが発生します。新しい DMS 6.5 で。新しい方法が正しいかどうかはわかりません。
var tracker = Sitecore.Analytics.Tracker.Visitor.CurrentVisit.CurrentPage;
if (tracker != null)
{
string dataXml = Review_Module.sitecore_modules.Review_module.Classes
.AnalyticsHelper.FillDataField(new string[]
{
"Title", title, "Description", description, "Rate", rate
});
PageEventData eventData = new PageEventData("Review");
eventData.Data = dataXml;
VisitorDataSet.PageEventsRow pageEventsRow = Sitecore.Analytics.Tracker.CurrentPage.Register(eventData);
Sitecore.Analytics.Tracker.Submit();
エラー
[PageEventDefinitionNotFoundException: The page event definition Review could not be found.]
Sitecore.Analytics.Data.DataAccess.DataSets.PagesRow.Register(PageEventData data) +170
Sitecore.Analytics.Data.DataAccess.DataSets.PagesRow.Register(String name, String text, String dataKey, String data) +127
ReviewModule.Nicam_Modules.Review_module.Controls.Review.ReviewClicked(Object sender, EventArgs e) +808
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +111
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +79
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
6.4 OMS の作業コード
string dataXml = Review_Module.sitecore_modules.Review_module.Classes.AnalyticsHelper.FillDataField(new string[]
{
"Title", title, "Description", description, "Rate", rate
});
tracker.CurrentPage.TriggerEvent("Review", "Review: \"" + Sitecore.Context.Item.Name + "\"", string.Empty, dataXml);
tracker.Submit();