If you want it to apply to the whole site, enter this in Site Settings.
- Navigate to onMessage.
- Select Website > your site.
- Click Site Settings.
- Scroll down under SEO to the Google Analytics field, and enter this here (below your existing GA code if you have one).
- Changes save automatically, and this will now apply the code to your whole site.
Note: Google states that some code needs to be included on EVERY page, just after the <body> tag. This is what step 5 is implying it will automatically do.
If you only want this to apply to specific pages:
- Navigate to onMessage.
- Select Website > your site.
- Click Master Layouts.
- Edit the Master Layout of the page(s) you want this applied to.
- Drag/drop the Embed Content Type onto your Master Layout.
- Add your Google Tag Manager code.
- Apply Changes.
- This will then apply the code to any page that Master Layout is used on.