Shopify has 4 plans: Basic, Shopify, Advanced and Plus. Officially Shopify only allows you to change the Checkout page only in the Plus plan ($2000/month subscription). But Shopify has provided an option to embed your script on the Checkout page. This feature can be used to modify the Checkout page: you can change elements on the page, as well as change the appearance by means of styles.
Your code is embedded in the store's admin area under Online Store / Preferences / Additional Google Analytics Javascript.