Google Tag Manager
This guide explains how to integrate the SiteCockpit embed code using Google Tag Manager (GTM). This allows you to include SiteCockpit on your website without editing the website's source code directly.
- Open Google Tag Manager
- Navigate to “Tags”
- Create a new tag
- Name and configure the tag
- Choose tag configuration
- Insert the embed code
- Enable document.write support
- Select a trigger
- Save the tag
- Additional Notes
Open Google Tag Manager
Access your Google Tag Manager account and open the desired workspace where the integration should be performed.
Navigate to “Tags”
In the left-hand navigation menu, click on “Tags” to view all existing tags.
Create a new tag
Click the “New” button in the top right to create a new tag.
Name and configure the tag
Give the tag a descriptive name, such as “SiteCockpit Integration.”
Choose tag configuration
Click on “Tag Configuration” and select “Custom HTML” from the list of tag types.
Insert the embed code
Paste the embed code provided in the SiteCockpit backend into the HTML field.
Enable document.write support
Below the editor, enable the option “Support document.write” to ensure the code executes correctly.
Select a trigger
Choose a trigger, ideally “All Pages”, so that the embed code loads on every page of your site.
Save the tag
Click “Save” to finish creating the tag and complete the integration.
Additional Notes
- Use the Preview mode in GTM to test if the tag works correctly before publishing.
- Regularly check if the tag is firing as expected.
- Any changes to the embed code require re-publishing the GTM container.