* Add /stats endpoint for articles, opened only to Pro users * Add analytics to article stats page * Add stats button to the article page and test stats page
12 lines
293 B
JavaScript
12 lines
293 B
JavaScript
import initCharts from '../analytics/dashboard';
|
|
|
|
function initDashboardArticle() {
|
|
const article = document.getElementById('article');
|
|
initCharts({ articleId: article.dataset.articleId });
|
|
}
|
|
|
|
window.InstantClick.on('change', () => {
|
|
initDashboardArticle();
|
|
});
|
|
|
|
initDashboardArticle();
|