Notification

G Suite가 이제 업무 처리에 필요한 모든 도구를 한곳에 모은 Google Workspace로 바뀌었습니다.

요청한 페이지는 현재 사용 중인 언어로 제공되지 않습니다. 페이지 하단에서 다른 언어를 선택하거나 Chrome에서 기본 제공되는 번역 기능을 사용해 웹페이지를 원하는 언어로 바로 번역할 수 있습니다.

Set up Google Tag Manager

2. Install a web container

Follow these steps to install the necessary code blocks for your website's Google Tag Manager container. For similar steps on setting up Tag Manager for other types of containers, refer to the following resources:


Before you begin

Steps

  1. Go to https://tagmanager.google.com.
  2. Sign in to your Google Account. Learn how to create a Google Account.
  3. On the Tag Manager container you want to edit.
  4. In the Workspace tab, select your container ID (which starts with 'GTM').
  5. In the Install Google Tag Manager dialog, follow these steps for each page of your website:
    1. Copy the first block of code and paste it as high in the <head> tag as possible.
      Example
      In the following sample HTML code, you would paste your first Google Tag Manager code snippet after the opening <head> HTML tag. Note that the following example uses 'GTM-ABCDEFGH,' but you must replace the ID with your container ID.
       

          <!DOCTYPE html>
          <html lang="en">
          <head>
              <!-- Google Tag Manager -->
              <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
              new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
              j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
              'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
              })(window,document,'script','dataLayer','GTM-ABCDEFGH');</script>
              <!-- End Google Tag Manager -->

              <title>Example Webpage</title>
          </head>
          <body>
              <!-- Content of your website -->
              <h1>Welcome to My Website</h1>
              <p>This is a sample paragraph on my webpage.</p>
          </body>
          </html>

    2. Copy the second block of code and paste it immediately after the opening <body> tag.
      Example
      In the following sample HTML code, you would paste your second Google Tag Manager code snippet immediately after the opening <body> HTML tag. Note that the following example uses 'GTM-ABCDEFGH,' but you must replace the ID with your container ID.
       

          <!DOCTYPE html>
          <html lang="en">
          <head>
              <!-- Google Tag Manager -->
              <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
              new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
              j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
              'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
              })(window,document,'script','dataLayer','GTM-ABCDEFGH');</script>
              <!-- End Google Tag Manager -->

              <title>Example Webpage</title>
          </head>
          <body>
              <!-- Google Tag Manager (noscript) -->
              <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-ABCDEFGH"
              height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
              <!-- End Google Tag Manager (noscript) -->

              <!-- Content of your website -->
              <h1>Welcome to My Website</h1>
              <p>This is a sample paragraph on my webpage.</p>
          </body>
          </html>

    3. Test your website by entering your website's link and then clicking Test.
  6. Click OK.

도움이 되었나요?

어떻게 하면 개선할 수 있을까요?
Search
Clear search
Close search
Main menu
12766705188722861589
true
도움말 센터 검색
true
true
true
true
true
102259
false
false