简体   繁体   English

在Sitecore 8 Analytics的实验配置文件中添加“内部关键字”

[英]Adding “Internal keywords” in Experiance Profile of Sitecore 8 Analytics

I need help. 我需要帮助。 How can I add "Internal keywords" in Sitecore 8 Analytics (Experiance Profile -> Activity -> Keywords)? 如何在Sitecore 8 Analytics (实验配置文件 - >活动 - >关键字)中添加“内部关键字” I tried to write keywords in code: 我试着在代码中写关键字:

Tracker.Current.Session.Interaction.Keywords = query;

but in Experiance Profile I have not found anything! 但在实验档案中我没有找到任何东西!

在此输入图像描述

I also encountered with this problem. 我也遇到过这个问题。 I can wite "Internal keywords" in Experiance Profile of Sitecore 8 by the adding of "Search Page Event" (standart item - "/sitecore/system/Settings/Analytics/Page Events/Search") on my view page. 我可以在我的视图页面上添加“搜索页面事件”(标准项目 - “/ sitecore / system / Settings / Analytics / Page Events / Search”),在Sitecore 8的Experiance Profile中找到“内部关键字”

Code "Tracker.Current.Session.Interaction.Keywords = query;" 代码"Tracker.Current.Session.Interaction.Keywords = query;" is not used in my case. 在我的情况下不使用。

Example

string query = "Example keywords in field <Keywords>";
Guid searchPageEventGuid = Sitecore.Context.Database.GetItem("{0C179613-2073-41AB-992E-027D03D523BF}").ID.Guid;
Guid view4Guid = Sitecore.Context.Database.GetItem("{D0D0E48C-7DE0-4C95-A994-F5ED00DC9820}").ID.Guid;
var page = Tracker.Current.Interaction.CurrentPage;

page.Register(new PageEventData("My search page event data", searchPageEventGuid)
                {
                    ItemId = view4Guid,
                    Data = query,
                    DataKey = query,
                    Text = query,

                });

"view4Guid" - this is my custom view page “view4Guid” - 这是我的自定义视图页面

Result: 结果:

  1. Search Page Event is called after visit of view page - "view4" 搜索页面事件在访问视图页面后调用 - “view4” 在此输入图像描述

  2. Internal keywords is vied in keyword tab 内部关键字关键字标签中查询 在此输入图像描述

Example with Search Page Event really works and code: Tracker.Current.Session.Interaction.Keywords = query; 搜索页面示例事件确实有效并且代码: Tracker.Current.Session.Interaction.Keywords = query; is not needed! 不需要!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM