- Aggiunto le Statistiche di visualizzazione delle pagine.

- Aggiunto il componente per visualizzare le statistiche
This commit is contained in:
Surya Paolo
2025-07-08 16:19:05 +02:00
parent 88cb2f13cc
commit d6579763f4
3 changed files with 287 additions and 24 deletions

26
src/server/models/PageView.js Executable file
View File

@@ -0,0 +1,26 @@
// /backend/models/PageView.js
const mongoose = require('mongoose');
const PageViewSchema = new mongoose.Schema({
url: {
type: String,
required: true
},
idapp: String,
ip: {
type: String,
default: 'unknown'
},
userId: String,
username: String,
userAgent: {
type: String
},
timestamp: {
type: Date,
default: Date.now
}
});
module.exports = mongoose.model('PageView', PageViewSchema);