Set Up Google Tag Manager (SuiteCommerce Advanced Aconcagua and Earlier)

This feature is not available on the Denali release of SuiteCommerce Advanced.

Follow these steps to set up Google Tag Manager (GTM):

Sign Up for Google Tag Manager

When you sign up for your GTM account, Google creates your GTM account and a container to hold your tags, triggers, variables, macros, and rules.

To sign up for a Google Tag Manager account:

  1. Go to https://www.google.com/analytics/tag-manager/.

  2. Sign in to GTM with your Google ID logins.

  3. GTM displays the Add a New Account page.

  4. Enter the name for your account. Normally this will be the site or business name.

  5. Select your country from the dropdown Country selector.

  6. Click Continue.

  7. In the Container Name field, enter your site name, for example www.mysite.com.

  8. For Where to Use Container, click Web to select it.

  9. Click Create.

  10. Agree to the Google Tag Manager Terms of Service.

  11. This displays the Install Google Tag Manager popup window which lists the code that can be placed on your web pages. Close this popup window because you do not need the code. The GTM Module places the code on your pages for you.

  12. On the Workspace tab, your GTM ID is displayed in the submenu header area in the upper right portion of the page. Make a note of this ID because you need it for the configuration. See Add Your Google Tag Manager ID to Your Configuration Record.

    GTM ID example
  13. Next you need the Account ID. Click on the Admin tab, then click Account Settings. Make a note of your Account ID because you need it when you create the GTM import JSON file.

    GTM Account Settings, Account ID example.
    Note:

    You can also find the Account ID in the URL.

    See Google Tag Manager Container Generator.

  14. The final ID you need is the container ID, which is available in the URL. You need this ID when you create the GTM import JSON file. See Google Tag Manager Container Generator. .

    GTM URLAccount ID example.

Add Your Google Tag Manager ID to Your Configuration Record

Add your GTM ID to your Suite Commerce Configuration Record to integrate GTM with your NetSuite account.

To add your Google Tag Manager ID to your configuration record:

  1. Go to Commerce > Web Sites > Configuration.

  2. Select your website and domain and click Continue.

  3. In the Commerce configuration record, go to the Integrations tab and the Google Tag Manager subtab.

  4. Enter your GTM ID in the Google Tag Manager ID field. Leave the Google Tag Manager Data Name field set to the default value of dataLayer.

    For more information, see Google Tag Manager Subtab.

  5. Click Save.

To configure Google Tag Manager (pre-Vinson):

  1. Create a custom module that includes the SC.Configuration object as a dependency.

    Note:

    Do not edit the original SC.Configuration.js source file directly. See Develop Your SCA Customization for information and best practices on customizing JavaScript.

  2. Redefine the id property for googleTagManager object to the Google Tag Manager ID.

Google Tag Manager Container Generator

To assist you in the process of adding tags to your GTM container, the GTM Container Generator enables you to create a JSON file you can use for importing the tags for the supported GTM services. This JSON file can then be imported into your GTM container, eliminating the need for you to manually add tags for supported services.

Note:

See Finding IDs for Different Tags for information about finding specific IDs requested by GTM Container Generator.

To create the Google Tag Manager Import JSON file:

  1. Go to Generate a Google Tag Manager Container.

  2. In the GTM Account ID field, enter the number you retrieved from the GTM URL.

  3. In the GTM Container ID field, enter the container number you retrieved from the GTM URL.

  4. Select the services you want to add.

    • Check the Google Ads box to include Google Ads tags in the JSON file.

    • Check the Google Analytics 4 box to include Google Analytics 4 (GA4) tags in the JSON file.

      • Enter your GA4 Tracking ID. See What happened to my Tracking ID? to find your Tracking ID.

      • Enter your GA4 Cross Domains. For cross domains, enter your main domain and your NetSuite checkout domain. If you use a subdomain for checkout instead of the NetSuite checkout domain, you can leave this field empty.

      Important:

      Google Analytics 4 (GA4) has replaced Google Universal Analytics (GAU) as Google’s cross-platform Analytics solution. All standard GUA properties stopped processing new hits on July 1, 2023. 360 Universal Analytics properties will stop processing new hits on July 1, 2024.

    • Check Bing Ads to include Bing Ads tags in the JSON file

      Enter your Conversion ID. See To find your Bing Ads Conversion ID:.

  5. Click Download. This creates the JSON file and downloads it to your computer. The file is named SCA.GoogleTagManager.json and it is saved to your browser’s default download location.

Import the JSON file into your Google Tag Manager container

After you create your GTM Import JSON file, import the JSON file into your GTM container. This creates the tags, triggers, and variables for your site.

To import the JSON file into your GTM container:

  1. Log in to your Google Tag Manager account.

  2. Click the Admin tab.

  3. Click Import Container.

    GTM Import Container File example
  4. This displays the Import Container page. Click Import Container and browse to the SCA.GoogleTagManager.json file and select it.

    GTM Overdrite or Merge example.
    • Select Overwrite to overwrite any existing tags with the new tags in the JSON file.

    • Select Merge to merge the new tags in the JSON file with any existing tags in the container. If you select this option, specify the following sub options:

      • Overwrite conflicting tags, triggers, and variables.

      • Rename conflicting tags, triggers, and variables.

  5. Click Confirm. This imports the JSON file and lets you preview the tags, triggers, and variables it contains.

    GTM Import Confirmation
  6. Click Confirm to complete the import.

    Note:

    After you import the JSON file, publish the container to make the changes live. See the Publishing, versions, and approvals topic on Google's support site in Tag Manager Help for more information.

Finding IDs for Different Tags

When you use the GTM Container Generator to create a GTM JSON file, you are asked to provide certain data elements that will be used when creating the tags for the services you select. The following procedures serve as a reference for locating those required data elements.

Note:

Do not implement the Google Analytics 4 (GA4) or Google Universal Analytics (GUA) features if you use GA4 or GUA in GTM because this causes duplicate tracking results.

To find your Google Analytics 4 ID:

  1. Follow the instructions in the Google support topic, What happened to my Tracking ID? to find your Google Analytics ID, which is referred to as the Tracking ID.

  2. See Set Up Analytics Account and Google Analytics 4 Property for more informnation about setting up a GA4 account with Google and finding your Tracking and Property IDs.

To find your Google Universal Analytics ID:

  1. Login to your Google Universal Analytics account at https://www.google.com/analytics/.

  2. Click the Home tab. The UA ID is displayed next to the property name under your account.

    Google Universal Analytics ID sample

To find your Google Ads Conversion ID and Label:

  1. Create a conversion in Tools > Conversions.

  2. Specify your preferences and Google displays your code snippet. It includes the Conversion ID and label.

    Google Conversion ID and Label example

To find your Bing Ads Conversion ID:

  1. Create a Conversion tracking in Tools > Conversions.

  2. Specify your preferences, and when Bing shows your code snippet, it includes the Conversion ID.

    Bing Ads Conversion ID example.

To find your Optimizely Project ID:

  1. When you finish your experiment, the project ID is available in the URL.

    Optimizely Project ID example.

Related Topics

Google Tag Manager
Set Up Google Tag Manager
Modify Google Tag Manager Services
Supported Google Tag Manager Services
Tracked Events

General Notices