🎨 Add 51la analytics plug-in code.

This commit is contained in:
凡梦星尘 2022-06-12 13:55:58 +08:00
parent 9e1a6e01cf
commit a6820c7d32
4 changed files with 11 additions and 1 deletions

View File

@ -780,6 +780,10 @@ params:
# See: https://theme-next.js.org/docs/third-party-services/statistics-and-analytics # See: https://theme-next.js.org/docs/third-party-services/statistics-and-analytics
# --------------------------------------------------------------- # ---------------------------------------------------------------
# 51La Analytics
# See: https://invite.51.la/1NUfGTS1?target=V6
laId: # <app_id>
# Google Analytics # Google Analytics
# See: https://analytics.google.com # See: https://analytics.google.com
google_analytics: google_analytics:

View File

@ -0,0 +1,4 @@
{{- with .Site.Params.laId }}
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id: "{{ . }}",ck: "{{ . }}",autoTrack:true})</script>
{{- end }}

View File

@ -5,3 +5,4 @@
{{- partial "head/facebook.html" . }} {{- partial "head/facebook.html" . }}
{{ partial "head/verify.html" . }} {{ partial "head/verify.html" . }}
{{- partial "head/style.html" . }} {{- partial "head/style.html" . }}
{{- partial "head/analytics.html" . }}

View File

@ -0,0 +1 @@
{{- partial "_thirdparty/analytics/51la.html" . }}