Tracking | Subscriptions, Scheduling, and Non-Retail eCommerce

Purpose

The purpose of this article is to demonstrate tracking implementations for non-retail user interactions with eCommerce sites, including subscriptions via form submission and event scheduling via HubSpot. 

The implementations recommended below include data layer support and Google Analytics 4 (GA4) tags. 

Difficulty: 79-799197_crossed-wrench-clipart.png 79-799197_crossed-wrench-clipart.png

Developer required for data layer support.

Subscriptions

Subscriptions and lead-generation usually involve collecting user information for future interactions. One of the most common lead-gen solutions is to embed a form one a website.

mceclip1.png

The four steps below detail our recommended tracking implementation for the demo form above.

Step 1: Data Layer Push

Execute the following script after successful form submissions. This should done programmatically from the website. 

<script>
(function(c,m,i,x){
 window.dataLayer.push({
   "event": c,
   "data": {
     "first_name": m,
     "last_name": i,
     "email": x
   }
  })
})("generate_lead","John", "Smith", "jsmith@channelmix.com" )
</script>

Where the function accepts user inputs from the form submission. 

Step 2: Data Layer Variables

For this implementation, a data layer variable should be created to capture each of the data variables pushed in Step 1. Due to the structure of the data layer push, we preface each of these with "data."

mceclip5.png

The actual name of the variables in GTM may vary based on your preferred naming convention, but the Data Layer Variable Name shown above must exactly match what is demonstrated, assuming you also use the exact data layer push that was demonstrated in Step 1. 

Data layer variables should also be created for data.last_name and data.email.

Step 3: Tag & Trigger

Demonstrated below is a GA4 Event that captures each of the variables created in the previous step. .

mceclip2.png

Trigger - The Tag should be trigger by the data layer event pushed in Step 1. Create a Custom Event Trigger and input the Event name "generate_lead".

mceclip3.png

Step 4 - Validation

After creating the variables, tag and trigger above, click Preview in GTM to test the implementation. 

Submit the form and ensure that the you see your tag fire in Tag Assistant, like below.

mceclip6.png

Scheduling

Scheduling may be for the purposes of a demo, sales call or consultation. 

Two of the most common solutions for scheduling are Calendly and HubSpot. We have provided links to guides for each below.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.