Create a site before adding the script
Open Sites and add the website’s name and domain. Confirm its reporting timezone and any additional domains you intend to include. Each site has its own public tracking identifier, so use the snippet belonging to the website you are installing.
Install once in your shared layout
Open Website settings → General → Script and copy the supplied snippet. It loads /js/script.js with defer and carries your site’s identifier in data-website-id. Put it in the shared HTML layout so all relevant pages include it, rather than duplicating it in individual components.
- Copy the complete site-specific snippet
- Use the shared page layout
- Avoid installing the tracker twice
Verify the deployed page
Open the website after deploying the change and confirm the script loads successfully. Visit a page, then return to the site reports to look for the first activity. The Script tab also provides an installation prompt you can copy to a coding agent.
Put it to work
Copy your snippet
Find Website settings → General → Script for the correct site.
Add it to the layout
Install the provided deferred script once in the shared layout, then publish the website change.
Check collection
Visit the deployed site, check for script-loading errors, and confirm activity appears in the reporting workspace.