Skip to content
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

Stats tracking code missing from AMP pages since 6.2 #9716

Closed
danjjohnson opened this issue Jun 8, 2018 · 2 comments · Fixed by #9718
Closed

Stats tracking code missing from AMP pages since 6.2 #9716

danjjohnson opened this issue Jun 8, 2018 · 2 comments · Fixed by #9718
Assignees
Labels
AMP [Type] Bug When a feature is broken and / or not performing as intended
Milestone

Comments

@danjjohnson
Copy link

danjjohnson commented Jun 8, 2018

Steps to reproduce the issue

  1. Create a test site with Jetpack 6.1.1
  2. Connect Jetpack and enable stats.
  3. Install the AMP plugin: https://wordpress.org/plugins/amp/
  4. Publish a post.
  5. View the source code of the /amp/ version of a post. See the tracking code starting with <amp-pixel
  6. Upgrade to Jetpack 6.2
  7. View the source code again.

What I expected

The stats tracking code should still be there.

What happened instead

It's not there.

Reported in 1210111-zen

@danjjohnson danjjohnson added [Type] Bug When a feature is broken and / or not performing as intended AMP labels Jun 8, 2018
@kraftbj
Copy link
Contributor

kraftbj commented Jun 8, 2018

This is because the AMP plugin was updated to back off of adding JP support in 6.2: ampproject/amp-wp@c280a51

Jetpack is checking for amp_is_canonical : 1bd4eaa#diff-f26e9ed01c2ca4e906e59c7c15b45ab1R69

That function, though, is to check if themes are declaring their own AMP support, thus short-circuiting the default templates: https://github.com/Automattic/amp-wp/blob/6e6275b84bba131010a90dbea4d325986728057b/amp.php#L274

EDIT: #9625 looks like it should have addressed this, so might be something else. No joy nevertheless for a pixel in amp.

@anaemnesis
Copy link

I think I may have come across a site experiencing behaviour related to this in #1208872-zen.

Tracking code is present on non-AMP pages, but missing on AMP pages, which is causing stats from Twitter to not report correctly in Calypso.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMP [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants