• Resolved genericname

    (@genericname)


    Hi,

    I have a custom Reader theme (a child of main theme) and I am trying to set up Google Analytics. I tried adding the snippet of json into the configuration field from the options page, but <amp-analytics> does not show up on my posts when I check the page source.

    View post on imgur.com

    If I try it with another Reader Theme like Twenty Nineteen it will work. Am I missing something for it to work on my own theme? Would I have to use the amp_post_template_analytics filter instead?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Does your custom AMP Reader child theme have wp_footer() as required?

    Thread Starter genericname

    (@genericname)

    Ah that was it! I was missing wp_footer().

    Thank you.

    Plugin Author Weston Ruter

    (@westonruter)

    Yes, the standard WordPress theme template tags should be used. So use wp_head() in header.php and wp_footer() in footer.php, etc.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Google Analytics question (Reader Theme)’ is closed to new replies.