Upgrade heatmaps stile Hotjar: movimenti mouse e anteprima pagina live.

Traccia i movimenti aggregati, overlay a gradienti sull’iframe della pagina e toggle click/move in admin.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-20 23:03:12 +02:00
co-authored by Cursor
parent 8a07c5d569
commit b84321346f
26 changed files with 361 additions and 96 deletions
@@ -22,7 +22,8 @@ RSpec.describe "Admin analytics", type: :request do
device: "desktop",
cell_x: 10,
cell_y: 15,
click_count: 4
click_count: 4,
move_count: 40
)
end
@@ -31,12 +32,14 @@ RSpec.describe "Admin analytics", type: :request do
expect(response).to have_http_status(:ok)
expect(response.body).to include("/prezzi")
expect(response.body).to include("12")
expect(response.body).to include("40")
end
it "mostra la heatmap di una pagina" do
get admin_analytics_page_path, params: { page_path: "/prezzi" }
expect(response).to have_http_status(:ok)
expect(response.body).to include("admin-heatmap")
expect(response.body).to include("admin-heatmap-frame")
expect(response.body).to include("/prezzi")
end
end