Tag manager code upload trouble shoot

I have tried to add google tag manager, the ID number was easy and straight forward however i tried to upload the verifying code needed for google tag manager in three areas and all not successful 1) advanced settings> analytics>tag manager (uploaded the main ID) however will not let me post the head and body code at all. 2) called support they said on wix editor at the bottom for code this just came up with a error message when i tried 3) settings >SEO> Head code > came up with error code, each time i inserted the code it said it was wrong.
THIS IS THE HEAD CODE FOUND ON GOOGLE TAG MANAGER

THIS IS THE BODY CODE FOUND ON GOOGLE TAG MANAGER

Has anyone else had this trouble and know what to do ?