-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetpack/Wordpress Pixel for AMP page is not added, after the last update #1722
Comments
This may explain what I'm seeing - Jetpack stats are not tracking AMP pages anymore |
@dartiss , I temporarily fix it by adding this code in the templates/footer.php.. https://codefaq.org/web-development/how-to-fix-wordpress-pixel-stat-tracking-not-working-in-amp-pages/ |
Continuation of discussion at https://wordpress.org/support/topic/v1-0-has-broken-jetpack-stats-tracking/ |
I can see what the problem is. The A quick (untested) workaround until it is fixed is to add this to your plugin or theme: add_filter( 'jetpack_is_amp_request', function() {
return did_action( 'parse_query' ) && function_exists( 'is_amp_endpoint' ) && is_amp_endpoint();
} ); I'll open a PR in Jetpack with a permanent fix. |
thanks @westonruter |
I've applied it to one of my sites and I'll let you know if it resolves the issue. If this is applied to Jetpack will having this patch as well cause problems? |
No, there won't be a conflict. |
PR has been opened for Jetpack: Automattic/jetpack#10918 Please test and provide feedback there. |
Hi,
It seems the pixel for tracking the views for jetpack is not added on the latest update for AMP. when i check the google cache amp, there is no wordpress pixel added.
The text was updated successfully, but these errors were encountered: