• Resolved rodria

    (@rodria)


    This is more of a heads up: the .json file that ends up hosted on <site_url>/wp-content/plugins/accelerated-mobile-pages/includes/features/analytics/ga4.json may not work if the server that is hosting that file does not allow it to be retrieved from other sources.

    So, if the amp page ends up being hosted on google (when the url is like https://www.google.com/amp/s/<link_to_amp_article>), it cannot retrieve that file, giving a CORS error, and all those page views do not reach GA4.

    Right now, I am hosting the file on a different server, where I can setup the configuration of that file in order to be retrieved from a different origin. But I believe that most users who use this plugin and do not do that, will have trouble seeing the pageviews in GA4

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter rodria

    (@rodria)

    EDIT: Just updated the plugin and I am checking that the fix does not involve external files.

    • This reply was modified 1 year, 4 months ago by rodria. Reason: I should have checked the code before writing!
    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Hi, Thank you for the response. Can you please kindly check once by clearing the server-side cache and see if the issue persists the same or not and let us know back the response? So that we will assist you accordingly if the issue persists the same.

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘GA4 does not receive pageviews when AMP page is hosted on google’ is closed to new replies.