Branch.io event logging

好久不见. 提交于 2019-12-12 13:29:06

问题


I am following the below link for logging ecommerce event in branch.io https://github.com/BranchMetrics/branch-deep-linking-public-api#logging-commerce-events I am using the same request as mentioned in the link.

but the details are not getting captured in branch.io dashboard.

I am getting "branch_view_enabled": false as a response.

Please help me out if there is any issue in settings ? or explicitly I will have to do something for seeing the events in the dashboard.

A response will be highly appreciated!


回答1:


I tried it like this new BranchEvent("Event Name") .addCustomDataProperty("Key", "Value") .logEvent(this);

And it shows the event name on the branch dashboard under summary. And my log shows that internally it was targeting the v2. I am sending it through android

https://api.branch.io/v2/event/custom




回答2:


This is Jackie from Branch. We are not yet supporting v2/events for commerce yet which is why you weren't able to track it on the dashboard.

Moving forward, please use v1 event request following our official documentation here. I've also included a sample commerce request for your information. In the meantime, we will update the commerce information on our github page so as not to cause any confusion.

curl -X POST https://api.branch.io/v1/event \
  -d '{
  "branch_key": "your_Branch_key",
  "identity": "222",
  "event": "purchase",
  "metadata": {
    "hello": "world",
    "custom_data": "this"
  },
  "commerce_data": {
    "revenue": 50.0,
    "currency": "USD",
    "transaction_id": "foo-transaction-id",
    "shipping": 0.0,
    "tax": 5.0,
    "affiliation": "foo-affiliation",
    "products": [
      {
        "sku": "foo-sku-1",
        "name": "foo-item-1",
        "price": 45.00,
        "quantity": 1,
        "brand": "foo-brand",
        "category": "Electronics",
        "variant": "foo-variant-1"
      },
      {
        "sku": "foo-sku-2",
        "price": 2.50,
        "quantity": 2
      }
    ]
  }
}'

Hope this helps. Please feel free to contact us directly if you have any other questions or issues at support@branch.io.

Best,

Jackie



来源:https://stackoverflow.com/questions/48151620/branch-io-event-logging

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!