Show front end users all time views and views today on posts, pages, index pages and custom post types with the Page Views Count Plugin. Use the Page Views Count function to add page views to any content type or object created by your theme or plugins.
I suggest that you should add headers that allow CORS since wordpress REST api allows it by default. Further more, you can make it configurable. In my case, I just simply allow it.
@Cyperwu
issuecomment-351584473