Hi,
To add google analytics code inside header or footer tpl file coding experience not required.
Simply get the google code ,in header or footer file add code with {literal}.google code {/literal} smarty tags.
I had added google analytics code in footer.tpl file in prestashop websites.
PrestaShop Tutorials Videos [How to do Tasks]
https://www.prestashop.com/forums/topic/907438-prestashop-tutorials-videos-how-to-do-tasks/