Unable to add ads code or analytics code in admin panel?

The only issue with ads and analytics code not updating is because of firewall on your web hosting company ask your Webhosting provider to unblock these pages form firewall.

https://www.your-domain.com/ads/ads-settings
https://www.your-domain.com/analytics/analytics-settings
https://www.
your-domain.com/scripts/header-footer