Automattic / Automattic/jetpack
Stats: Headless compatibility
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### What
It would be nice to have a section that provides us with this script to integrate statistics or other services with our site
### How
We have developed a site using Wp headless but we do not see a way to continue using Jetpack stats with our new site developed with NuxtJs.
At the moment I was reading the plugin code to generate a basic integration but I don't know the code obtained would be good.
## Script generated by plugin
This code requires the blog ID, domain and post/page ID
https://stats.wp.com/e-202351.js
_stq = window._stq || [];
_stq.push([ 'view', {v:'ext',blog:'BLOG_ID',post:'POST_ID',tz:'-5',srv:'DOMAIN',j:'1:11.6.1'} ]);
_stq.push([ 'clickTrackerInit', 'BLOG_ID', 'POST_ID' ]);
Contributor guide
Research direction
Review Jetpack's existing statistics integration and the script at https://stats.wp.com/e-202351.js, focusing on how a headless NuxtJs site could provide the blog ID, domain, and post/page ID. Done means documenting or implementing a supported integration path for Jetpack Stats in a headless site.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nuxtjs, php, wordpress
- Domain
- analytics, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100