apache-karaf - Apache UNOMI 中的段创建问题
问题描述
过去两周我一直在探索 Unomi,在此过程中,我创建了用户会话和事件,并在用户属性和事件类型上创建了一些片段,但是当我想在事件属性上创建片段时我卡住了。
首先是我们发送给 unomi 的事件——
{
"source":{
"itemType":"pageView",
"scope":"the-coolest-website",
"itemId":"pageView"
},
"events":[
{
"eventType":"view",
"scope":"the-coolest-website",
"source":{
"itemType":"pageView",
"scope":"the-coolest-website",
"itemId":"pageView"
},
"properties":{
"myProperty":"myValue"
}
}
]
}
我们正在尝试做的是创建一个针对具有此 myProperty:myValue 键值对的事件的细分。
我创建的段如下:
{
"metadata": {
"id": "myPropertySegment",
"name": "myPropertySegment",
"scope":"the-coolest-website",
"description": "The user has this segment if it has acessed our products Website.",
"readOnly": true
},
"condition": {
"parameterValues": {
"subConditions": [
{
"parameterValues": {
"propertyName": "myProperty",
"comparisonOperator": "equals",
"propertyValue": "myValue"
},
"type": "eventPropertyCondition"
}
],
"operator": "and"
},
"type": "booleanCondition"
}
}
在上述事件属性段中,用户没有资格将事件属性设置为“myProperty”:“myValue”。
在事件类型上创建了另一个细分:
{
"metadata": {
"id": "eventCondition",
"name": "eventCondition",
"scope": "the-coolest-website",
"description": "The user has this segment if it has acessed our products Website.",
"readOnly": true
},
"condition": {
"parameterValues": {
"subConditions": [
{
"parameterValues": {
"propertyName": "eventType",
"comparisonOperator": "equals",
"propertyValue": "myAwesomeUserEvent"
},
"type": "eventTypeCondition"
}
],
"operator": "and"
},
"type": "booleanCondition"
}
}
在上面的事件类型段中,用户有资格将 eventType 设置为 myAwesomeUserEvent。
请在创建事件属性段时帮助我,如果我在创建段时出错,请告诉我。
解决方案
推荐阅读
- jmeter - 如何在仪表板页面中动态获取 Jmeter 版本和 Java 版本
- json - 如何使用 shell jq 动态解析 JSON 对象
- android - webview 弹出窗口中的内容隐藏在键盘后面(请阅读特殊情况)
- python - 为什么存在参数时 Django 2.1 login_required 不起作用
- php - 需要一些关于 php curl 的信息
- html - Html CSS 表单改变背景
- regex - Pyspark 路径正则表达式负前瞻
- sql - 使用分区查询复制数据
- list - 按属性值对 Flutter (Dart) 中的对象列表进行排序
- algorithm - 密码原理是什么?