Title: Adding AdSense code causes JSON error
Last modified: March 29, 2022

---

# Adding AdSense code causes JSON error

 *  Resolved [medievalreporter](https://wordpress.org/support/users/medievalreporter/)
 * (@medievalreporter)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/adding-adsense-code-causes-json-error/)
 * Whenever I add the cope snippet from AdSense to a post in the Block Editor, I
   get the following message: “Updating failed. The response is not a valid JSON
   response.” When I remove the AdSense code, the post updates just fine. How can
   I manually place AdSense ads without making myself unable to edit my own pages?
 * PS This worked just fine before. My older posts have ads up and running. But 
   as of late, I’m unable to edit these pages.
    -  This topic was modified 4 years, 2 months ago by [medievalreporter](https://wordpress.org/support/users/medievalreporter/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-adsense-code-causes-json-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/adding-adsense-code-causes-json-error/#post-15505384)
 * Hi [@medievalreporter](https://wordpress.org/support/users/medievalreporter/),
 * Thanks for reaching out. Have you tried to insert the AdSense snippet using Site
   Kit, rather than manually inserting any AdSense Auto ads code? If using Site 
   Kit there is no need to manually insert AdSense code, the plugin does it for 
   you when connecting the AdSense module.
 * If your enquiry is regarding adding single ad units, as opposed to the AdSense
   Auto ads snippet, you can reach out to the product experts at the [AdSense Help Center](https://support.google.com/adsense/?hl=en#topic=3373519)
   for assistance. We’re limited to Site Kit queries here in the plugin support 
   forums. I am aware that the “.._response is not a valid JSON response_” error
   is a generic WordPress error and can have multiple causes. You may wish to check
   your Site Health status for any REST API errors, or use the Health Check & Troubleshooting
   plugin to rule out any third party plugin conflicts.
 * Let me know anyway if you need any assistance allowing Site Kit to insert your
   AdSense (Auto ads) snippet for you.

Viewing 1 replies (of 1 total)

The topic ‘Adding AdSense code causes JSON error’ is closed to new replies.

 * ![](https://ps.w.org/google-site-kit/assets/icon-256x256.png?rev=3141863)
 * [Site Kit by Google - Analytics, Search Console, AdSense, Speed](https://wordpress.org/plugins/google-site-kit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-site-kit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-site-kit/)
 * [Active Topics](https://wordpress.org/support/plugin/google-site-kit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-site-kit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-site-kit/reviews/)

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)

 * 1 reply
 * 2 participants
 * Last reply from: [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/adding-adsense-code-causes-json-error/#post-15505384)
 * Status: resolved