How add Google ads code in the site i use elgg 3

I want to add google ads code in my site in Footer and Sidebar I want now Which files should be modified