How to Set Up Tracking in Google Tag Manager (GTM)
This guide will help you set up tracking so activity inside your showroom is properly recorded in Google Analytics 4 (GA4).
You only need to do this once.
Step 1: Create Variables (Tell GTM What Information to Capture)
Variables are pieces of information we want to track (for example: product name, page title, search term, etc.).
In Google Tag Manager:
- Go to Variables
- Under “User-Defined Variables” click New
- Choose Data Layer Variable
- Enter the variable name exactly as listed below
- Click Save
Create these one by one:
| Variable Name | Data Layer Variable Name |
|---|---|
| DLV - Page Path | pagePath |
| DLV - Page Title | pageTitle |
| DLV - Product ID | productId |
| DLV - Product Name | productName |
| DLV - Modal Name | modalName |
| DLV - Modal Type | modalType |
| DLV - Page Number | pageNumber |
| DLV - Breadcrumb Group | breadcrumbGroup |
| DLV - Hotspot ID | hotspotId |
| DLV - Hotspot Type | hotspotType |
| DLV - Content ID | contentId |
| DLV - Content Type | contentType |
| DLV - Interaction Type | interactionType |
| DLV - Search Term | searchTerm |
| DLV - Results Count | resultsCount |
| DLV - Form Name | formName |

Once done, move to the next step.
Step 2: Create Event Triggers (Tell GTM When to Track Something)
Triggers tell GTM when to send data.
In GTM:
- Go to Triggers
- Click New
- Choose Custom Event
- Enter the Event Name exactly as written below
- Click Save
Create these triggers:
virtualPageviewproductViewmodalOpenpaginationChangehotspotClickcontentView3dInteractionsearchformSubmit

The event names must match exactly (including capital letters).
Step 3: Create GA4 Event Tags (Send the Data to Google Analytics)
Now we connect everything to Google Analytics 4.
For each trigger above, create a matching GA4 Event Tag.
Example 1: Virtual Page View
- Go to Tags
- Click New
- Choose Google Analytics: GA4 Event
- Enter your GA4 Measurement ID (looks like: G-XXXXXXXXXX)
- Event Name:
page_view
Under Event Parameters add:
page_path→ {{DLV - Page Path}}page_title→ {{DLV - Page Title}}
Trigger: select virtualPageview

Click Save
Example 2: Product View
Create a new GA4 Event tag:
Event Name: view_item
Event Parameters:
item_id→ {{DLV - Product ID}}item_name→ {{DLV - Product Name}}
Trigger: productView
Save.

Example 3: Hotspot Click
Create a GA4 Event tag:
Event Name: hotspot_interaction
Event Parameters:
hotspot_id→ {{DLV - Hotspot ID}}hotspot_type→ {{DLV - Hotspot Type}}
Trigger: hotspotClick
Save.
Repeat this same pattern for:
modalOpencontentView3dInteractionpaginationChangesearchformSubmit
Each event should:
- Use a GA4 Event tag
- Match the trigger name
- Include the relevant variables




Step 4: Test Everything Before Publishing
Before going live:
- Click Preview (top right in GTM)
- Enter your showroom website URL
- Navigate through the showroom
- Check that events appear in the GTM debug panel
- Also check Google Analytics → Realtime Report to confirm events are being received
If events appear correctly, you're ready to publish.
Step 5: Publish
- Click Submit
-
Add a Version Name
Example:
“Virtual Showroom – Initial Tracking Setup”
- Click Publish
Step 6: Create Additional Variables
We need to tell GTM about some new pieces of information related to:
- Panorama changes
- Product selector interactions
- Grid menu opens
In Google Tag Manager:
- Go to Variables
- Under User-Defined Variables, click New
- Choose Data Layer Variable
- Enter the name exactly as shown below
- Click Save
Create these 10 new variables:
| Variable Name | Data Layer Variable Name |
|---|---|
| DLV - Panorama ID | panoramaId |
| DLV - Panorama Name | panoramaName |
| DLV - Selector ID | selectorId |
| DLV - Selector Title | selectorTitle |
| DLV - Thumbnail Index | thumbnailIndex |
| DLV - Thumbnail Name | thumbnailName |
| DLV - Filters | filters |
| DLV - Filter Type | filterType |
| DLV - Template | template |
| DLV - Menu ID | menuId |
Once these are saved, move to the next step.
Step 7: Create New Custom Event Triggers
Some of these events use existing triggers, but a few new ones are required.
In GTM:
- Go to Triggers
- Click New
- Choose Custom Event
- Enter the event name exactly as written
- Click Save
Create these new triggers:
productSelectorChangeproductSelectorThumbnailClickproductSelectorOpengridMenuOpen
Make sure the names match exactly (capital letters matter).
You already have the 3dInteraction trigger from the previous setup - we’ll reuse that.
Step 8: Create or Update GA4 Event Tags
Now we connect everything to Google Analytics 4.
Panorama Change Event
Use your existing trigger: 3dInteraction
Create a new GA4 Event tag:
Event Name:
panorama_change
Event Parameters:
panorama_id→ {{DLV - Panorama ID}}panorama_name→ {{DLV - Panorama Name}}interaction_type→ {{DLV - Interaction Type}}
Trigger: 3dInteraction
Save.
Product Selector Change
Create a new GA4 Event tag:
Event Name:
product_selector_change
Event Parameters:
selector_id→ {{DLV - Selector ID}}selector_title→ {{DLV - Selector Title}}thumbnail_index→ {{DLV - Thumbnail Index}}thumbnail_name→ {{DLV - Thumbnail Name}}
Trigger: productSelectorChange
Save.
Product Selector Thumbnail Click
Create another GA4 Event tag:
Event Name:
product_selector_thumbnail_click
Event Parameters:
selector_id→ {{DLV - Selector ID}}selector_title→ {{DLV - Selector Title}}thumbnail_index→ {{DLV - Thumbnail Index}}thumbnail_name→ {{DLV - Thumbnail Name}}
Trigger: productSelectorThumbnailClick
Save.
Product Selector Open
Create a GA4 Event tag:
Event Name:
product_selector_open
Event Parameters:
selector_id→ {{DLV - Selector ID}}selector_title→ {{DLV - Selector Title}}
Trigger: productSelectorOpen
Save.
Grid Menu Open
Create a GA4 Event tag:
Event Name:
grid_menu_open
Event Parameters:
template→ {{DLV - Template}}menu_id→ {{DLV - Menu ID}}
Trigger: gridMenuOpen
Save.
Final Step: Test Before Publishing
As before:
-
Click Preview
Enter your showroom URL
Interact with:
- Panorama switching
- Product selector
- Thumbnail clicks
-
Grid menu open
Confirm events appear in:
- GTM Debug panel
- Google Analytics → Realtime
You should now see:
- panorama_change
- product_selector_change
- product_selector_thumbnail_click
- product_selector_open
- grid_menu_open
Publish
If everything looks correct:
- Click Submit
-
Add a version name
Example:
“Virtual Showroom – Panorama & Selector Tracking”
- Click Publish