How can you check if a website has Google Tag Manager installed by looking at the source code?
Detecting Google Tag Manager (GTM) on a website involves identifying specific markers characteristic of GTM in the website’s source code.
Here’s a step-by-step guide on how to do it:
- Open the Page Source: Right-click on the webpage and select “View Page Source” or press
Ctrl+U
(Windows) orCmd+Option+U
(Mac) to open the page’s source code. - Search for GTM-Specific Scripts: Use
Ctrl+F
(Windows) orCmd+F
(Mac) to open the search function and look for the following keywords:<script src="https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXXX"></script>
. - Search for the
dataLayer
variable: GTM uses a JavaScript array calleddataLayer
to pass information:<script> window.dataLayer = window.dataLayer || []; </script>