# Google Analytics google_analytics: tracking_id: # 你的跟踪代码 # By default, NexT will load an external gtag.js script on your site. # If you only need the pageview feature, set the following option to true to get a better performance. only_pageview: false
# Show Views / Visitors of the website / page with busuanzi. # Get more information on http://ibruce.info/2015/04/04/busuanzi busuanzi_count: enable: true total_visitors: true total_visitors_icon: fa fa-user total_views: true total_views_icon: fa fa-eye post_views: false post_views_icon: fa fa-eye
Firebase 是基于 Google 账号的,所以可以直接用 Google 账号,我们先创建一个项目
创建完成后点击下图所示位置获取apiKey和projectId
下图红框圈中的地方就是你的apiKey和projectId
配置 NexT 主题
打开 主题配置文件 ,搜索 firestore 关键字,设置如下
script
1 2 3 4 5 6 7 8
# Another tool to show number of visitors to each article. # Visit https://console.firebase.google.com/u/0/ to get apiKey and projectId. # Visit https://firebase.google.com/docs/firestore/ to get more information about firestore. firestore: enable: true collection: articles # Required, a string collection name to access firestore database apiKey: # 你的 apiKey projectId: # 你的 projectId
# Show number of visitors of each article. # You can visit https://leancloud.cn to get AppID and AppKey. # AppID and AppKey are recommended to be the same as valine's for counter compatibility. # Do not enable both `valine.visitor` and `leancloud_visitors`. leancloud_visitors: enable: true app_id: # 获取的 App id app_key: # 获取的 AppKey # Required for apps from CN region server_url: # <your server url> # Dependencies: https://github.com/theme-next/hexo-leancloud-counter-security # If you don't care about security in leancloud counter and just want to use it directly # (without hexo-leancloud-counter-security plugin), set `security` to `false`. security: true