惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
博客园 - 聂微东
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
F
Fortinet All Blogs
C
Check Point Blog
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More

inDev. Journal

Upgrade Ubuntu servers GitHub Markdown emojis for Jekyll with JoyPixels icons Windows 11 To Go on external SSD for MacBook Install qBittorrent-nox on Ubuntu server Building a pageview counter with Deta.sh Micros and Base database Install Nextcloud with PlanetScale cloud database 给国行 SONY A105 播放器刷国际版固件 Install GeoIP2 module to Nginx Get free ZeroSSL wildcard SSL certificates with acme.sh DNS API
重置网页阅读量数据
Frank Lin · 2022-03-31 · via inDev. Journal

近期准备把网站用到的所有 API 接口都用 serverless 重新部署。查询了一圈发现 Deta.sh 的 Micros 在调用量和流量上几乎没有限制,所以转到 Deta Micros 作为主要的阵地,部分也使用了 Cloudflare Workers。国内大厂的话还是推荐百度智能云的云函数,毕竟良心地给了 1 GB 的出口流量~

原本想用 MongoDB 作为数据库练练手的,但是 Micros 目前不支持连接 MongoDB,只能作罢 🤣

Deta 也提供了 Base 数据库 (NoSQL),并且容量和读写次数都不限 👍️,在同一平台上运行,理当性能是不错滴。所以也把之前放在 Google Firestore 上的网页访问量数据库也挪到 Deta Base 上来了。

因为懒嘛,没做数据迁移,直接舍弃了之前的数据,从零开始计数了。之前从 LeanCloud 迁移到 Firestore 也没有保留数据,真是懒呀 😴

粗略的搭建过程见 Building a pageview counter with Deta.sh Micros and Base database 💯

此外,我还发现了一个很好用的浏览量统计系统,GoatCounter,免费版提供 100k pageviews/month,支持自定义域名,也有 API 返回统计数据,还支持公开数据统计页面。对博客网站来说,完全可以用来替代 GA4 这些 👍️

PPS,https://pixe.la 这个非常适合用来做数据统计嘛,反正也是要在 Micros 中写入数据库的,也顺道把数据推送到 Pixe Graph 中,下面就是实时的 Graph…

inDev. Journal pageviews, by Pixe.la

最近疫情反反复复,大家注意防护 😷, 祝大家安康!💪

Hey, there! This is Frank Lin (@flinhong), one of the 1.41 billion . This 'inDev. Journal' site holds the exploration of my quirky thoughts and random adventures through life. Hope you enjoy reading and perusing my posts.

YOU MAY ALSO LIKE

Automatically purge Cloudflare cache after Netlify build

Automatically purge Cloudflare cache after Netlify build

Although Netlify provides CDN service, Cloudflare has more edge locations around the world. What's more, Netlify hosted sites are hardly reached in China, while Cloudflare still lives. With this in mind, I decided to switch to Cloudflare for load balancing. However, pushing post/file changes to Netlify did not clear Cloudflare's cache, that's a mess. So, I'm going to use Cloudflare's API together with Netlify's outgoing webhook to make them in the same pace.

Setup Google Analytics 4 with GTM

Setup Google Analytics 4 with GTM

Google Analytics 4 is Google's newest version of Google Analytics. Since I'm using the Google Tag Manager, just take a few steps to set up GA4 for my site.

RECENT READS