Sometimes we .php header. We don't have to connect to ftp for that. We can easily do this from the theme editor section from the wordpress interface. the steps are as follows;
first we go > the theme editor section of the view section
then we select the file that we want to edit from the right side. I will .php on header because that's where we add the code that's required for google analytics.
then we say to make the necessary arrangements and update them from the edit section.