I may have just figured it out. I’ll explain what I found. If it’s wrong, please correct me.
In the admin, click on “appearance,” and then on the drop down list click on “editor.”
On right hand side there will be “Theme files,” and “templates.” Click on “footer” template, and the php and html code comes up for the ending of each WP page that uses the template (which is all WP pages), the “ending” being just before the “body” closing tag, right where google analytics wants it.
Click on “Update file.”
If the above is incorrect, please reply.