You can add the Google Analytics tracking ID to your site with the code component. By placing the code component in the template, it will automatically be added to all pages that are using that template.
Note: First, you need to find the tracking ID and the code snippet. Check this guide from Google on how to find this: Set up Analytics tracking
- Open Website Builder from the One.com control panel.
- Go to Template Mode.
- Drag the Code component in the template.
- Paste in the tracking code snippet that you got from Google.
- Click Settings on the code component.
- Click Placement in the floating menu that has appeared.
- Select Before closing </head>.
- Click Save and then Publish.
Because the code component is placed before the closing </head> tag, the code component will not be visible on the published page(s). In Website Builder, it is visible at the top, above the page area.
Tip: When you add a tracking code to your site, you need to inform your visitors about this in a cookie banner. Read our guide to learn how: How do I add a cookie banner to my website?