This technical reference article documents all data layer variables that Pulse Commerce automatically sends to Google Tag Manager. Use this information when configuring custom tags, triggers, and variables in your GTM container.
Pulse Commerce automatically adds a Data Layer object to your Google Tag Manager container on every page load. This data layer contains information about the current page type, customer status, product details, and order information.
How it works:
- Different page types send different data layer variables
- Product pages include product information (name, SKU, price, brand, category)
- Order confirmation pages include complete transaction data
- Customer information is included when users are logged in
- All data is automatically available in GTM without any manual coding
Common use cases:
- Setting up Google Analytics 4 e-commerce events
- Configuring conversion tracking pixels
- Creating custom marketing tags based on page type
- Tracking customer behavior across different page types
dataLayer array automatically on page load.The table below lists every data layer variable that Pulse Commerce sends to GTM, organized by which page types include each variable.
| Variable Name | Available On | Description |
|---|---|---|
pageType |
All pages | Type of page being viewed. Possible values: Product Group, Product, Category, Custom Content Page, Shopping Cart, Home Page, Order Review, Order Confirmation |
customerFirstName |
All pages | Customer's first name (only when logged in) |
customerLastName |
All pages | Customer's last name (only when logged in) |
categoryName |
Category pages | Name of the category being viewed |
shoppingCartQuantity |
Shopping Cart page | Total quantity of items in cart |
| Product Detail Page Variables | ||
ecommerce |
Product Detail, Order Review | Primary e-commerce object containing product or order data |
ecommerce.detail.products |
Product Detail | Array of product objects (contains one item on product pages) |
ecommerce.detail.products.name |
Product Detail | Product name |
ecommerce.detail.products.id |
Product Detail | Product SKU |
ecommerce.detail.products.category |
Product Detail | Primary category of the product |
ecommerce.detail.products.brand |
Product Detail | Product manufacturer/brand |
ecommerce.detail.products.price |
Product Detail | Customer price of the product |
| Order Confirmation Page Variables | ||
ecommerce.purchase.actionField.id |
Order Confirmation | Unique order ID |
ecommerce.purchase.actionField.affiliation |
Order Confirmation | Webstore name |
ecommerce.purchase.actionField.revenue |
Order Confirmation | Total revenue from the order (including tax and shipping) |
ecommerce.purchase.actionField.tax |
Order Confirmation | Total tax charged on the order |
ecommerce.purchase.actionField.shipping |
Order Confirmation | Total shipping cost for the order |
ecommerce.purchase.products |
Order Confirmation | Array of all products in the order |
ecommerce.purchase.products.name |
Order Confirmation | Product name |
ecommerce.purchase.products.id |
Order Confirmation | Product SKU |
ecommerce.purchase.products.price |
Order Confirmation | Unit price of the product |
ecommerce.purchase.products.quantity |
Order Confirmation | Quantity of this product in the order |
totalCharged |
Order Confirmation | Total amount charged to the customer |
orderSubTotal |
Order Confirmation | Subtotal for products (before tax and shipping) |
shipMethod |
Order Confirmation | Shipping method selected by customer |
pageType to create page-specific triggers, product variables for item tracking, and purchase variables for conversion tracking.The following examples show the actual JavaScript code that Pulse Commerce pushes to the data layer on different page types. You can view these in GTM Preview mode.
Homepage
push({
'pageType': 'Home Page',
'customerFirstName': 'John',
'customerLastName': 'Doe'
});
Product Detail Page
push({
'ecommerce': {
'detail': {
'products': [{
'name': 'Bluebirds Birdfeeder',
'id': 'B330',
'category': 'bird feeders',
'brand': 'Bayberry Collection',
'price': '79.96'
}]
}
},
'pageType': 'Product',
'customerFirstName': 'John',
'customerLastName': 'Doe'
});
Category Page
push({
'pageType': 'Category',
'categoryName': 'bird feeders',
'customerFirstName': 'John',
'customerLastName': 'Doe'
});
Shopping Cart
push({
'pageType': 'Shopping Cart',
'shoppingCartQuantity': '6',
'customerFirstName': 'John',
'customerLastName': 'Doe'
});
Order Confirmation Page
push({
'ecommerce': {
'purchase': {
'actionField': {
'id': '9949',
'affiliation': 'My Store',
'revenue': '140.15',
'tax': '7.93',
'shipping': '14.360'
},
'products': [
{
'name': 'Bluebirds Birdfeeder',
'id': 'B330',
'price': '79.96',
'quantity': 1
},
{
'name': 'Ivy Birdfeeder',
'id': 'B670',
'price': '18.95',
'quantity': 1
}
]
}
},
'totalCharged': '140.15',
'orderSubTotal': '117.91',
'shipMethod': 'UPS Ground',
'customerFirstName': 'John',
'customerLastName': 'Doe',
'pageType': 'Order Confirmation'
});
To use data layer variables in your GTM tags, you must first create corresponding variables in your GTM workspace. Here's how to create a variable that accesses data layer information.
Example: Creating a Variable for Order Total
This example shows how to create a variable to access the order revenue from the data layer.
1In GTM, go to Variables > User-Defined Variables and click New
2Name your variable (e.g., OrderTotal)
3Click Variable Configuration and select Data Layer Variable
4In the Data Layer Variable Name field, enter the exact variable name from the reference table above
- For order revenue:
ecommerce.purchase.actionField.revenue - For product name:
ecommerce.detail.products.name - For page type:
pageType
5Leave Data Layer Version set to Version 2 (default)
6Click Save

Using Variables in Tags
Once created, you can reference your variable in any tag using double curly braces: {{OrderTotal}}
OrderID, ProductName, PageType) so they're easy to identify when building tags and triggers.Triggers determine when your tags fire. The most common approach is creating triggers based on the pageType variable to fire tags on specific page types.
Example: Creating a Trigger for Order Confirmation Page
1In GTM, go to Workspace > Triggers and click New
2Name your trigger (e.g., Order Confirmation Page)
3Click Trigger Configuration and select Page View
4Select Some Page Views
5Set the condition:
-
Variable:
pageType(you must create this variable first) - Operator: equals
-
Value:
Order Confirmation
6Click Save

Alternative Trigger Method: URL-Based
You can also create triggers based on URL patterns instead of page type. For example, for order confirmation:
- Trigger Type: Page View
-
Condition: Page URL contains
ss-check-me-out.asp
Note: Using pageType is generally more reliable than URL patterns, as URLs may change but page types remain consistent.
pageType = Product), Category pages (pageType = Category), Shopping Cart (pageType = Shopping Cart), and Order Confirmation (pageType = Order Confirmation).How do I verify what data layer variables are being sent?
Use GTM Preview mode:
- In GTM, click Preview
- Enter your store URL and connect
- Browse your site normally
- In the GTM debug panel, click on any event and select the Data Layer tab
- You'll see all variables and their values for that page
Why aren't my product variables showing up?
Product-specific variables (like ecommerce.detail.products) only appear on product detail pages where pageType = Product. Make sure you're testing on an actual product page, not a category or homepage.
Can I access variables that aren't in the reference table?
Only the variables listed in the reference table are automatically sent by Pulse Commerce.
What's the difference between totalCharged and ecommerce.purchase.actionField.revenue?
Both represent the order total, but:
-
totalChargedis a standalone variable for easy access -
ecommerce.purchase.actionField.revenueis part of the structured e-commerce object and is the standard format for GA4
For GA4 tracking, use ecommerce.purchase.actionField.revenue.
Do I need to create variables for every data layer field?
No, only create variables for the data you actually need to use in your tags. For example, if you're only tracking purchases, you only need to create variables for the purchase-related fields you're using.
Can I modify the data layer values?
The data layer values are generated automatically by Pulse Commerce and cannot be modified directly. However, you can create custom variables in GTM that transform or combine data layer values (e.g., using Variable Templates or Custom JavaScript variables).
Where can I learn more about advanced GTM techniques?
For advanced GTM tutorials and techniques, visit GTM Custom Events.