Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] 在设置界面增加自定义头部选项以让Umami更方便地采集网站流量信息 #1141

Closed
Episode233 opened this issue Jan 24, 2024 · 9 comments · Fixed by #1267
Labels
🌠 Feature Request New feature or request | 特性与建议 🙋‍♂️ PR Welcome released

Comments

@Episode233
Copy link

🥰 需求描述

在当前的umami实现下,用户需要手动插入script标签到每一个需要追踪的页面中。这既不方便也容易出错,特别是对于大型网站和使用docker部署的环境。
umami

🧐 解决方案

我建议umami在设置界面增加一个新的选项,可以让用户添加自定义的头部。这样用户可以在这个界面直接指定需要插入的script标签,umami会自动将这个标签添加到每个页面的头部。这和alist的实现方式很类似,可以参考。
另外,如果可能的话,我也希望得到一个详细的教程讲解如何在docker部署的环境中手动添加script标签。
alist

📝 补充信息

No response

@Episode233 Episode233 added the 🌠 Feature Request New feature or request | 特性与建议 label Jan 24, 2024
@lobehubbot
Copy link
Member

👀 @Episode233

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


🥰 Description of requirements

Under the current umami implementation, users need to manually insert script tags into each page that needs to be tracked. This is both inconvenient and error-prone, especially for large websites and environments deployed using docker.
umami

🧐 Solution

I suggest umami add a new option in the settings interface that allows users to add custom headers. In this way, users can directly specify the script tag that needs to be inserted in this interface, and umami will automatically add this tag to the header of each page. This is very similar to the implementation of alist, you can refer to it.
In addition, if possible, I would also like to get a detailed tutorial on how to manually add script tags in a docker deployed environment.
alist

📝 Supplementary information

No response

@arvinxx
Copy link
Contributor

arvinxx commented Jan 24, 2024

@Episode233 要做流量统计的话,可以参考这部分的实现:https://github.com/lobehub/lobe-chat/blob/main/src/components/Analytics/index.tsx

这样就 docker 部署几个环境变量可能就好了。

@Episode233
Copy link
Author

貌似暂时不支持umami,未来有考虑添加吗?🫡

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It seems that umami is not supported for the time being. Are you considering adding it in the future? 🫡

@arvinxx
Copy link
Contributor

arvinxx commented Jan 24, 2024

貌似暂时不支持umami,未来有考虑添加吗?🫡

欢迎PR~

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It seems that umami is not supported for the time being. Are you considering adding it in the future? 🫡

Welcome PR~

@lobehubbot
Copy link
Member

@Episode233

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 0.126.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌠 Feature Request New feature or request | 特性与建议 🙋‍♂️ PR Welcome released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants