---
schema_version: "1"
id: 8f44120b9b8c118199954c7a32c92299008a7035c728b604ebe1d42d227dd4e9
title: Add Google Tag Manager Data to the Example Omniscript Steps
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_steps_std.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_omnianalytics_add_gtm_data_omniscript_steps_std.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: eb5c343daecdd5ed162224c6c736f77c94c74aaf937e7b5ce9623c70ccc36b2d
description: The Messaging Framework of each step stores the product data 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 Steps

The Messaging Framework of each step stores the product data that’s sent to Google Analytics Ecommerce and the Google Tag Manager.

If you aren't in the Omniscript, from the App Launcher, find and select **Omnistudio**, then click **Omniscripts**. In the Omniscript list, expand **Documentation/OmniAnalytics** and click **E-commerce Buyflow Omniscript (Version 2)**.

Perform these steps for each Step element in the Omniscript:

1. Click the Step element.
2. In the Properties pane, click **Properties** to display the Step element properties.
3. Expand the Messaging Framework section.
4. Make sure the Window postMessage, Pub/Sub, and Session Storage boxes are checked.
5. Under Message, add a Key/Value pair with eventAction as the key. The value depends on the Step element you're editing:
    
    <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="d60492e91">
                  <p style="margin-bottom:0;">Step Element</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d60492e97">
                  <p style="margin-bottom:0;">Value of eventAction Key</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Step Element" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e91 ">
                  <p style="margin-bottom:0;">Select Device</p>
                </td>

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

              </tr>
              <tr class="">
                <td data-label="Step Element" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e91 ">
                  <p style="margin-bottom:0;">View Quote</p>
                </td>

                <td data-label="Value of eventAction Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e97 ">
                  <p style="margin-bottom:0;">select_item</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Step Element" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e91 ">
                  <p style="margin-bottom:0;">View Cart</p>
                </td>

                <td data-label="Value of eventAction Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e97 ">
                  <p style="margin-bottom:0;">add_to_cart</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Step Element" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e91 ">
                  <p style="margin-bottom:0;">Review Cart</p>
                </td>

                <td data-label="Value of eventAction Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e97 ">
                  <p style="margin-bottom:0;">begin_checkout </p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Step Element" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e91 ">
                  <p style="margin-bottom:0;">Shipping Address</p>
                </td>

                <td data-label="Value of eventAction Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e97 ">
                  <p style="margin-bottom:0;">add_shipping_info</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Step Element" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e91 ">
                  <p style="margin-bottom:0;">Provide Payment</p>
                </td>

                <td data-label="Value of eventAction Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e97 ">
                  <p style="margin-bottom:0;">add_payment_info</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Step Element" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e91 ">
                  <p style="margin-bottom:0;">Generate Receipt</p>
                </td>

                <td data-label="Value of eventAction Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d60492e97 ">
                  <p style="margin-bottom:0;">purchase</p>
                </td>

              </tr>
            </tbody>
          </table>
6. Add a Key/Value pair with transID as the key. You can leave the value blank for all the steps except the Generate Receipt step. For that step, you can use any value. For example, you can use a timestamp.
    
    If your Google Analytics configuration processes all events in the same way, all events require the same parameters, even if some events don't use them.
7. Add a Message Key/Value pair with products as the key, and leave the value blank.
8. Click **Edit Properties as JSON**.
9. Replace the empty quotes after the `products` node with one of these JSON arrays. Make sure a colon precedes the opening bracket and a closing brace follows the closing bracket.
    
    For the Select Device step, use this JSON array:
    
    ```
    [
      {
        "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
      }
    ]
    ```
    
    For all other steps, use this JSON array:
    
    ```
    [
      {
        "item_name": "%DeviceName%",
        "item_brand": "Apple",
        "item_category": "Mobile",
        "item_variant": "Black",
        "price": 699,
        "quantity": 1
      }
    ]
    ```
10. Click **Close JSON Editor**.

This is the final task in the current workflow. For the next task in the parent workflow, see [Setting Up Third-Party Tracking and Event Types](https://help.salesforce.com/s/articleView?id=xcloud.os_omnianalytics_workflow_configure_external_std.htm&release=264.0.0&type=5 "An External Tracking Definition specifies a third-party analytics account and tag manager that the OmniAnalytics tracking data is sent to. External Tracking Event Types specify data formats for specific events.").