Where in the HTML of your webpage should you place your Analytics tracking code?
Just after the opening <head> tag of your website
Just after the opening <body> tag of your website
Just before the closing </body> tag of your website
Just before the closing </head> tag of your website
You just need to paste the entire snippet into the HTML on your web pages, just before the closing </head>tag.
Read more here: https://support.google.com/analytics/answer/1008080
Set up Analytics tracking
Find your tracking ID and tracking-code snippet
To find the tracking ID and code snippet:
Sign in to your Analytics account.
Select an account from the menu in the ACCOUNT column.
Select a property from the menu in the PROPERTY column.
Under PROPERTY, click Tracking Info > Tracking Code.
Your tracking ID and property number are displayed at the top of the page.
Information about tracking apps is displayed under Mobile app tracking – Using the SDK.
The tracking-code snippet for your website is displayed under Website tracking.
You need to add the tracking code to each page or screen from which you want to collect data.
Find the setup for the type of property you’re tracking
There are several ways to collect data from online properties in Analytics, depending on whether you want to track a website, an app, or some type of Internet-connected device. The following methods explain how to set up the tracking code for different types of properties.
Web-hosting service (you don’t manage the source code)
Website using Google Tag Manager
Internet-connected device or CRM system
Verify that your tracking code is working
Once you have successfully installed the Analytics tracking code, it can take up to 24 hours for data such as traffic-referral information, user characteristics, and browsing information to appear in your reports. However, you can check your web-tracking setup immediately.