---
schema_version: "1"
id: 0772a367117592c1278ef32af4fd26da35bf024cd8a080cc9b3040fa64ead795
title: Add Google Tag Manager Data to the Example Omniscript Setup
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_omnianalytics_add_gtm_data_omniscript_setup_std.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_omnianalytics_add_gtm_data_omniscript_setup_std.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 0700c47a49a7daa1fe2a009c319e81ee666c4da2d273c4f286336ca8bf26d7b8
description: The Messaging Framework of the Script Setup stores the complete list of product impressions that’s sent to Google Analytics Ecommerce and the Google Tag Manager.
products:
  - Omnistudio
release: "264"
---
# Add Google Tag Manager Data to the Example Omniscript Setup

The Messaging Framework of the Script Setup stores the complete list of product impressions that’s sent to Google Analytics Ecommerce and the Google Tag Manager.

1. From the App Launcher, find and select **Omnistudio**, then click **Omniscripts**.
2. In the Omniscript list, expand **Documentation/OmniAnalytics** and click **E-commerce Buyflow Omniscript (Version 1)**.
3. Click **New Version**.
    
    The new version is Version 2. The previous version without the Google Tag Manager data is Version 1.
4. In the Properties pane, click **Setup**.
5. Select **Enable Tracking**.
6. Expand the Messaging Framework section.
7. Make sure the Window postMessage, Pub/Sub, and Session Storage boxes are selected.
8. Under Message, add these Key/Value pairs:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d53945e110">
                  <p style="margin-bottom:0;">Key</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d53945e116">
                  <p style="margin-bottom:0;">Value</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d53945e110 ">
                  <p style="margin-bottom:0;">eventAction</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d53945e116 ">
                  <p style="margin-bottom:0;">view_item_list</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d53945e110 ">
                  <p style="margin-bottom:0;">products</p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d53945e116 ">
                  <p style="margin-bottom:0;">(leave blank)</p>
                </td>

              </tr>
            </tbody>
          </table>
9. Scroll to the bottom and click **Edit Properties as JSON**.
10. Replace the empty quotes after the `products` node with this JSON array. Make sure a colon precedes the opening bracket and a closing brace follows the closing bracket.
    
    ```
    [
      {
        "item_name": "Apple iPhone 7",
        "item_brand": "Apple",
        "item_category": "Mobile",
        "item_variant": "Black",
        "price": 699,
        "quantity": 1
      },
      {
        "item_name": "Apple iPhone 8",
        "item_brand": "Apple",
        "item_category": "Mobile",
        "item_variant": "Black",
        "price": 699,
        "quantity": 1
      },
      {
        "item_name": "Apple iPhone X",
        "item_brand": "Apple",
        "item_category": "Mobile",
        "item_variant": "Black",
        "price": 699,
        "quantity": 1
      },
      {
        "item_name": "Apple iPhone 11",
        "item_brand": "Apple",
        "item_category": "Mobile",
        "item_variant": "Black",
        "price": 699,
        "quantity": 1
      },
      {
        "item_name": "Apple iPhone XR",
        "item_brand": "Apple",
        "item_category": "Mobile",
        "item_variant": "Black",
        "price": 699,
        "quantity": 1
      }
    ]
    ```
11. Click **Close JSON Editor**.

After you add Google Tag Manager data to the example Omniscript Setup, [Add Google Tag Manager Data to the Example Omniscript Steps](https://help.salesforce.com/s/articleView?id=xcloud.os_omnianalytics_add_gtm_data_omniscript_steps_std.htm&release=264.0.0&type=5 "The Messaging Framework of each step stores the product data that’s sent to Google Analytics Ecommerce and the Google Tag Manager.").