Skip to content

Commit

Permalink
feat: add LingQue.Monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
imjason authored Jul 3, 2022
1 parent c573d0c commit f6f166e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layout/_partial/scripts/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<%- partial('../../_plugins/analytics/LCCounter') %>
<% } %>

<% if (config.google_analytics_key || config.baidu_analytics_key || config.tencent_aegis_id || config.v6_51_la) { %>
<% if (config.google_analytics_key || config.baidu_analytics_key || config.tencent_aegis_id || config.v6_51_la || config.perf_51_la) { %>
<%- partial('../../_plugins/analytics/script') %>
<% } %>

Expand Down
10 changes: 9 additions & 1 deletion layout/_plugins/analytics/script.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,12 @@ volantis.pjax.push(()=>{_hmt.push(['_trackPageview', document.location.pathname]
})
</script>
<% } %>


<% if (config.perf_51_la) { %>
<script src="https://sdk.51.la/perf/js-sdk-perf.min.js" crossorigin="anonymous"></script>
<script>
volantis.js("https://sdk.51.la/perf/js-sdk-perf.min.js").then(() => {
new LingQue.Monitor().init({id:"<%= config.perf_51_la %>",sendSuspicious:true});
})
</script>
<% } %>

0 comments on commit f6f166e

Please sign in to comment.