Skip to main content

Configuring Ecommerce Tracking for Tenant Portal

In this article, we'll be covering topics for configuring Ecommerce tracking for the tenant portal. The article assumes you have completed basic Google Tag manager configuration. If you have not done so, please review the articles listed in the "Prerequisites" section.

Please note that QuikStor does not provide SEO or digital marketing services but, should you need help getting this configured, or want someone to do it for you, please visit our partners page for vendors that specialize in this.

While writing this article, we've taken into account optimizing to track both rentals and reservations. If your facility does not do online rentals, you can skip those elements however, it won't hurt anything to configure them now, and then they will be in place should you decide to try online rentals in the future.

Prerequisites:

Google tag manager installed and configured (need to write this article)

Creating Triggers

Let's get started in Google Tag Manager by creating three triggers. The first will help us track all tenant portal events, and the other two will focus on online rentals and reservations. In the end, you'll wind up with three new triggers.

Configuring the Tenant Portal All Events Trigger

Open Google Tag Manager -> Workspace -> Triggers

Click New to create a new trigger.

Name it "Tenant Portal | All Events"

Select trigger configuration -> Custom Event

For event name, add in the following:
​view_item_list|select_item|add_to_cart|begin_checkout|add_shipping_info|checkout_progress|add_payment_info|purchase|generate_lead|form_error|funnel_exit|navigation_click|modal_opened|modal_closed

Check the box to "Use regex matching"

Click "Save"

Configuring the Tenant Portal | Rental Only Trigger

Click new to create a new trigger

Name it "Tenant Portal | Rental Only"

Select Trigger Configuration

Choose Custom Event as trigger type

For event name enter "purchase" and save the trigger.

Configuring the Tenant Portal | Reservation Only Trigger

Click new to create a new trigger

Name it "Tenant Portal | Reservation Only"

Select Trigger Configuration

Choose Custom Event as trigger type

For event name enter "generate_lead" and save the trigger.

Creating Tags

Create the GA4 Tenant Portal tag

Go to tags -> New

Name it Google Analytics | GA4 | Tenant Portal

Select tag configuration

Choose Google Analytics

Select GA4 event as tag type.

Input your measurement ID or Select GA4 measurement ID variable if you have created one.

Select the variable icon for Event Name.

Select "Event" as the event variable. This will automatically use the name of the event in the data layer as the name of the event that is sent to Google Analytics.

Select more settings

Check "Send Ecommerce Data"

Set data source to "Data Layer"

Now, lets set the trigger by clicking into that section.

Choose "Tenant Portal | All Events| as the trigger.

Save the tag.


Reviewing the Data Layer

Basic data about the transaction is sent to the data layer, depending on whether the tenant rents or reserves. Here are two examples:
​

Reservation

Rental

Next, we need to pass this information to Google Analytics


Create Variables to Pass Ecommerce Data to Analytics

Now, we're going to create three variables to pass data from the Data layer to Google Analytics.

Create Ecommerce Value Variable

Go to Variables -> User Defined Variables

Click "New"

Name the variable "Ecommerce Value"

Click into Variable Configuration

Select "Data Layer Variable"

Name the data layer variable "ecommerce.value" - This will calculate the value of the rental or reservation.

Note: This captures the total amount paid, including any pro-rate, taxes, monthly charges, etc.

Save the Variable

Create Ecommerce Unit ID Variable

Go to Variables -> User Defined Variables

Click "New"

Name the variable "Ecommerce Unit ID"

Click into Variable Configuration

Select "Data Layer Variable"

Set the variable name to "ecommerce.items.0.item_id"

Save the variable

Create Ecommerce Currency Variable

Go to Variables -> User Defined Variables

Click "New"

Name the variable "Ecommerce Currency"

Click into Variable Configuration

Select "Data Layer Variable"

Set the variable name to "ecommerce.currency"

Save the variable

Did this answer your question?