I am setting up my own blog, and I'm having fun making it with Ajax calls to WP API (plus a default php fallback). Everything works properly so far, but what's making me wonder is how to make Jetpack work properly. I know that with Google Analytics I could send a pageview event, do you know if this is possible with Jetpack?

I was thinking of firing something like a Jetpack pageview event using Javascript. Any idea?


  • 2
    Obviously this belongs in jetpack support forum? – Mark Kaplun Apr 4 '16 at 9:16

I don't think it's documented, but you can probably use _stq.push. Here's what I see on one of my sites with WordPress.com Stats:

_stq.push([ 'view', {v:'ext',j:'1:3.8.2',blog:'1234567',post:'123',tz:'3',srv:'example.org'} ]);
  • Mh, I need to know what those j, blog and tz values are though – alemur Apr 4 '16 at 9:12
  • j is Jetpack api_version:version, blog is your WordPress.com blog id, tz is the timezone offset. More info here: github.com/Automattic/jetpack/blob/… – kovshenin Apr 4 '16 at 9:21
  • Thanks, I will give it a try (I'm not on wordpress.com, hopefully it will work anyway) – alemur Apr 4 '16 at 9:32
  • If you're using Jetpack Stats then you are on WordPress.com, even if you don't actually have a WordPress.com-hosted site. – kovshenin Apr 4 '16 at 9:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.