As per the docs I’ve created an analytics rule wit...
# community-help
m
As per the docs I’ve created an analytics rule with the following configuration:
Copy code
{
  "name": "qa_product_queries_aggregation",
  "type": "popular_queries",
  "params": {
    "source": {
      "collections": [
        "qa-products"
      ]
    },
    "destination": {
      "collection": "qa-product-queries"
    },
    "expand_query": false,
    "enable_auto_aggregation": false,
    "limit": 1000,
    "events": [
      {
        "type": "search",
        "name": "qa-products_search_event"
      }
    ]
  }
}
However, when I try to retrieve the rule using:
GET /analytics/rules
it returns an empty object or list, even though the creation call was successful. Also, when I try to send an event like this: { "type": "search", "name": "qa-products_search_event", "data": { "q": "mango", "user_id": "123", "shop_id": "shop_456", "zipcode": "560001", "timestamp": 1717580000000 } } I get the error: {"message": "No analytics rule defined for event name qa-products_search_event"} Why the rule doesn’t show up when I retrieve it? Why the event is not being matched, even though the name matches exactly?