You are here:
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:
- Click the Step element.
- In the Properties pane, click Properties to display the Step element properties.
- Expand the Messaging Framework section.
- Make sure the Window postMessage, Pub/Sub, and Session Storage boxes are checked.
-
Under Message, add a Key/Value pair with eventAction as the
key. The value depends on the Step element you're editing:
Step Element
Value of eventAction Key
Select Device
view_item_list
View Quote
select_item
View Cart
add_to_cart
Review Cart
begin_checkout
Shipping Address
add_shipping_info
Provide Payment
add_payment_info
Generate Receipt
purchase
-
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.
- Add a Message Key/Value pair with products as the key, and leave the value blank.
- Click Edit Properties as JSON.
-
Replace the empty quotes after the
productsnode 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 } ] - 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.

