在 django-suit 的 admin 首页嵌入 Google Analytics 数据面板
django-otto-admin — Django 后台模板
作者 otto-torino
django-otto-admin 是一个基于 MIT 许可的 Django 后台定制应用,为 django-suit 的 admin 首页加入 Google Analytics 数据面板。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
目前有 1 张原始预览,可打开完整图片查看设计细节。
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
面板包含实时活跃用户、近 15 天流量、热门页面、浏览器、引荐来源、访客国家与社交互动
提供 en、it 两种语言
可自定义版权字符串、开发方名称与链接、支持邮箱
通过服务账号 JSON 密钥和 Analytics 视图 ID 接入数据
模板详细介绍
django-otto-admin 面向使用 django-suit 的 Django 项目,在 admin 首页模板中嵌入 Google Analytics 报告组件。项目通过 Google Analytics Embed API 读取数据,展示实时活跃用户、近 15 天流量(会话与用户)、热门页面浏览量、主要浏览器、引荐流量、访客国家以及社交互动等指标。
使用前需要先在 Google Developer Console 创建服务账号并下载 JSON 密钥,再把该服务账号以只读权限加入 Google Analytics 视图;随后在 Django 设置中配置密钥文件路径与视图 ID,并把 otto_admin 放在 suit 之前加入 INSTALLED_APPS。除分析面板外,应用还提供英文与意大利文两种语言,以及可自定义的版权字符串、开发方名称与链接、支持邮箱。
项目依赖 django-suit 与 google-api-python-client,仓库最近更新时间为 2018 年,未在资料中说明对较新 Django 版本的兼容情况。
适合你的项目吗?
适用场景
- 已使用 django-suit 的 Django 项目希望在后台首页直接查看网站流量概况
- 需要把 Google Analytics 的实时与近 15 天数据放进内部管理界面
- 需要为后台页脚配置自定义版权、开发方与支持邮箱信息
- 需要英文或意大利文后台界面的项目
适合人群
- 使用 django-suit 作为后台主题的 Django 项目
- 已具备 Google Analytics 视图并愿意创建只读服务账号的团队
- 希望减少在后台与 Analytics 之间切换次数的运营或内容管理人员
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
通过 pip install django-otto-admin 安装
- 2
在 INSTALLED_APPS 中把 otto_admin 放在 suit 之前
- 3
在 Google Developer Console 创建服务账号并下载 JSON 密钥,将其加入项目
- 4
把服务账号邮箱以只读权限添加到目标 Google Analytics 视图
- 5
配置 OA_ANALYTICS_CREDENTIALS_JSON 与 OA_ANALYTICS_VIEW_ID,可选配置 OA_COPYRIGHT、OA_SUPPORT_EMAIL、OA_POWERED_BY、OA_POWERED_BY_URL
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 使用分析面板前必须拥有 Google Analytics 视图,并在其中添加服务账号(建议只读权限),因此依赖外部 Google 服务与账号。
- 需在 Google Developer Console 创建服务账号并生成 JSON 密钥,属于外部服务账号与密钥要求。
- 必须配置服务账号 JSON 密钥文件路径,缺少该配置无法使用分析功能。
- 必须配置 Google Analytics 视图 ID,属于必填的外部服务参数。
- 运行依赖 django-suit 后台主题,未安装该第三方包则无法使用。
- 运行依赖 google-api-python-client 库以访问 Google Analytics API。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Add the service account as a user in Google Analytics.
README 原文
create a service account
README 原文
###__OA_ANALYTICS_CREDENTIALS_JSON (required)__
README 原文
###__OA_ANALYTICS_VIEW_ID (required)__
README 原文
- django-suit
README 原文
https://github.com/otto-torino/django-otto-admin/blob/master/LICENSEhttps://github.com/otto-torino/django-otto-admin/blob/master/README.md- google-api-python-client
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料一般 · 60 / 100
- 技术栈
- Django
- 网站类型
- 后台
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2018-01-22
- 截图检查日期
- 2026-10-03
目前没有记录演示链接。请依据仓库说明在本地评估;仅凭截图无法确认交互行为。
目录记录的主要技术栈是 Django。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 45c965f6eb402f9b2ca7881480f56f5066485b71f44b58805b3599f4c34267bc
2026-10-03T07:45:28.049Z
来源文件 / 仓库# django-otto-admin
Django admin customization app for [django-suit](https://github.com/darklow/django-suit)
Would you like to have some google analytics report widgets in your admin index page? Then you're in the right place!

## Features
- locales: en, it
- custom copyright string
- custom developed by string and url
- custom support mailto
- admin index with google analytics panel implemented through [analytics embed API](https://ga-dev-tools.appspot.com/)
- Realtime active users
- Traffic (sessions and users), last 15 days
- Popular Page views, last 15 days
- Top Browsers, last 15 days
- Referral traffic, last 15 days
- Visitors Countries, last 15 days
- Social actions, last 15 days
### Configure your analytics widgets
Follow the steps in the Google Identity Platform documentation to [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount) from the [Google Developer Console](https://console.developers.google.com/).
Once the service account is created, you can click the Generate New JSON Key button to create and download the key and add it to your project.
Add the service account as a user in Google Analytics. The service account you created in the previous step has an email address that you can add to any of the Google Analytics views you'd like to request data from. It's generally best to only grant the service account read-only access.
Then you will need to configure __otto\_admin__ with the json path and the view ID (continue reading).
## Requirements
- django-suit
- google-api-python-client
## Getting Started
1. Install django-otto-admin
```
pip install django-otto-admin
```
2. Configure your django-suit installation
3. Add `otto_admin` to your installed apps __before__ `suit`
```
INSTALLED_APPS = (
'otto_admin',
'suit',
'django.contrib.admin',
# ...
```
4. Configure your settings
## Settings configuration
###__OA_ANALYTICS_CREDENTIALS_JSON (required)__
full path to the json key file of your app service account
###__OA_ANALYTICS_VIEW_ID (required)__
id of the analytics view you want to show in the admin index
###__OA_COPYRIGHT__
Copyright string, default '2015 Otto srl'
###__OA_SUPPORT_EMAIL__
Mailto support email, default '[email protected]'
###__OA_POWERED_BY__
Powered by string, default 'Otto srl'
###__OA_POWERED_BY_URL__
Powered by url, default 'http://www.otto.to.it'
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

typescript-backend-toolkit
Production-ready Express.js/TypeScript framework with auto-generated OpenAPI, Artisan-style CLI, plugin system…
Django · 后台

Django_Management_System_template
✨ 基于 Django 和 Mysql 的信息管理系统模板 ✨。 后台管理系统,OA ,表单系统,管理员系统,数据库管理系统模板,数据库访问模板。
Django · 后台

sneat-bootstrap-html-django-admin-template-free
Most Powerful & Comprehensive Free Django HTML Admin Dashboard Template built for developers! :rocket:
Django · 后台

materio-bootstrap-html-django-admin-template-free
Most Powerful & Comprehensive Free Django HTML Admin Dashboard Template built for developers! :rocket:
Django · 后台

sbadmin
Django bootstrapped template integration for Admin
Django · 后台

django_project
Purple Admin is a free responsive admin template built with Bootstrap 4. The template has colorful, attractive…
Django · 后台
