         stream = fetch_stream(conn, [category], params)
 
         conn
-        |> track_post_view(stream.posts, stream_kind: "category", stream_id: category.id)
+        |> track_post_view(stream.posts, stream_kind: stream_kind(conn), stream_id: category.id)
         |> add_pagination_headers("/categories/#{category.slug}/posts/recent", stream)
         |> api_render(PostView, :index, data: stream.posts)
     end

  end

  defp category_stream_key(%{slug: slug}), do: "categories:v1:#{slug}"
end

    stream = fetch_stream(conn, categories, params)

    conn
    |> track_post_view(stream.posts, stream_kind: stream_kind(conn))
    |> add_pagination_headers("/categories/posts/recent", stream)
    |> api_render(PostView, :index, data: stream.posts)
  end
