Where in the HTML of your webpage should you place your Analytics tracking code?
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
Just after the opening <head> tag of your website
Explanation:
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
The first step to setting up tracking for a website is to create an Analytics property. Create one Analytics property for each website you want to track.
Creating an Analytics property generates a tracking ID and a JavaScript tracking code snippet. The next step to set up tracking for a website is to do one of the following:
- Add the entire tracking code snippet to each web page you want to track. Add the tracking code snippet just before the closing
</head>
tag on each page.OR
- Enter the tracking ID into a field that asks for the Google Analytics tracking ID. (For some web-hosting services, you don’t need to add the entire tracking code snippet to each web page on your site. Instead, you’ll simply need to enter the tracking ID into a field. If this field exists, you can usually find it in the “Admin” or “Analytics” section of your web hosting. For more information, read “Web-hosting service”, under Find the setup for the type of property you’re tracking, below.)
Find your tracking ID and tracking code snippet
To find the tracking ID and code snippet:
- Sign in to your Analytics account.
- Click Admin.
- 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.
- The tracking code snippet for your website is displayed under Website tracking.