c# - 如何将对象映射到 C# 中谷歌分析事件的正确查询字符串?
问题描述
我需要从服务器发送谷歌分析事件,但找不到有关如何正确映射对象的文档。
我需要发送这样的事件
{
"event": "nameOfEvent",
"ecommerce": {
"currencyCode": "eur",
"purchase": {
"actionField": {
"id": "9d9e3cc9-0007-4aaa-d986-08d6g2f07b63",
"affiliation": "",
"revenue": 100
},
"products": [
{
"name": "Product name",
"id": "id",
"price": 200,
"category": "Category",
"variant": "Buy online",
"quantity": "1",
"dimension1": "1",
"dimension2": "2",
"dimension3": "3"
}
]
}
}
}
结果应该和https://www.google-analytics.com/debug/collect?v=1&t=event&tid=UA-222-1&uid=1&el=nameOfEvent&
这里类似 我有问题,下一步怎么办???我将不胜感激任何帮助!
解决方案
看起来可能是这个的副本。手动将数据发送到 Google Analytics。
上面的帖子引用了 Google 测量协议的 C# 实现https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide。
推荐阅读
- reactjs - Redux Thunk 提交操作
- python - Tensorflow 时期太慢了
- sql - 在 vb.net 中将“字符串”转换为“SQlCommand”
- css - 如何在 SCSS 中扩展变量的映射?
- linux - 有没有办法在 linux 中删除 atom-editor 中的标题栏
- python - 在模型中为 __str__ 编写 djnago 测试
- php - Laravel 状态在代码中没有改变
- reactjs - 使用 thunk 的 React-Redux 异步函数不起作用
- java - IBM MQ 云连接
- sass - 无法在 Gatsby SCSS 中导入 Google 字体