- A tag for the selected property already exists
- An existing tag was found on the page
- An existing tag GTM-*** was found on the page
- Removing existing code
- Removing Site Kit-placed code
When setting up Site Kit and additional services, if Site Kit detects existing code for the service (e.g. Analytics, Google Tag Manager, and AdSense) that you are connecting, it will allow you to choose if you wish to have Site Kit place the necessary code instead. If Site Kit does not detect any existing code, it will place the necessary code for you.
If you choose not to have Site Kit place code for you, you can still use Site Kit to view dashboard metrics. Site Kit will display data in the dashboard from the associated Google account/property/tag(s) that you selected during service setup.
NOTE: Allowing Site Kit to place code when it has already detected existing code means that your site will have the code placed twice. This could result in data being double tracked, so we recommend either removing existing code and then turning on Site Kit code placement in Site Kit > Settings or turning off the toggle to allow Site Kit to place code during setup.
A tag for the selected property already exists
This message indicates that Site Kit has detected that the GA4 or UA tag that you are trying to add via Site Kit has already been added to your site via another method.
When this occurs, Site Kit will automatically set the Place Google Analytics 4 code toggle to off to avoid duplication. If you wish to remove the tag as inserted elsewhere, you can do so and later ask Site Kit to insert the tag instead by going to Site Kit > Settings > Connected Services > Analytics > Edit > Place Google Analytics 4 code.
An existing tag was found on the page
This message indicates that Site Kit has found an existing GA4 tag on your site.
If you choose not to remove the existing tag and allow Site Kit to insert a tag for the other property that you select, data will be tracked to both properties.
If you prefer to track data only for the property that you select in Site Kit, you will need to find and remove the existing tag.
An existing tag GTM-*** was found on the page
This message indicates that an existing Google Tag Manager snippet was found on your site.
You can choose to select the existing account and container if you wish. If selected, Site Kit will set the Let Site Kit place code on your site toggle to off to ensure that a duplicate Google Tag Manager snippet is not placed. Alternatively, you can select a different account and container that is associated with your Google Tag Manager account. Site Kit will then insert this container code snippet on your site as long as you’ve set the Let Site Kit place code on your site toggle to on.
Removing existing code
If Site Kit finds existing code for one or more services, you may want to remove that code and instead let Site Kit place the appropriate code for you. Code for Google services, such as Analytics tags, can be placed in a variety of ways. To find and remove code, please check:
- Your theme configurations. Some themes include dedicated settings in the WordPress admin that allow you to add Analytics scripts. You can also check your theme’s customizer settings, which can typically be accessed via Appearance > Customization from your WordPress administrator dashboard.
- Google Tag Manager, as Google Analytics can be added as tags within GTM containers.
- Your theme templates. These include your `header.php` and `footer.php` files, usually contained within your theme’s root directory. Be careful when checking these files, as changes can have major effects on your site. If you feel unsure about doing this, please check with your technical contact.
- Any plugins that allow you to insert header/footer scripts (e.g. Insert Headers and Footers) and/or allow you to add Analytics scripts (e.g. Monster Insights).
- Any other third-party plugins with Google Analytics integration.
Once code is removed, you can go to Site Kit > Settings > Connected Services and click Edit for the service that you wish to have Site Kit place code for, then set the toggle for placing code to on.
Removing Site Kit-placed code
Site Kit-placed code can be switched off if desired. Choosing to turn off code placement means that Site Kit will not place code for the selected Google service.
When you turn off Site Kit-placed code for a service, it is still possible to use Site Kit to view related dashboard metrics if the necessary code for that service has been placed by other means, such as manually or via another plugin. If you want to view associated data for these services in Site Kit, you can choose to connect to the service using the associated Google account, but not allow Site Kit to place code for them.
You can choose to switch these options back on in future and Site Kit will once again place the relevant code. Code placed by Site Kit will be removed if the Site Kit plugin is disabled or removed from your site.
To turn off code placement for a Site Kit service:
- Navigate to Site Kit > Settings > Connected Services and edit the service for which you wish to turn off code placement.
- Switch off the code placement option. See screenshots of options for each service below.