Overview
Google Tag Manager (GTM) is a free tool that simplifies the process of managing and deploying marketing tags on your checkout without requiring developers to modify the code. With GTM, you can add, update, and test tags like Google Analytics, Meta Pixel, or custom scripts.
gaiia offers a GTM integration that will embed your desired container in the checkout, allowing you to track visitors, events and orders.
Instructions
Step 1: Find your container ID
- If you don’t already have a container, refer to the official GTM doc to create and setup your container: Tag Manager Help
- Once the container has been created, take note of the container ID (which starts with 'GTM')
Step 2: Setup the GTM integration in gaiia
- In gaiia, navigate to Settings → Integrations → App directory tab → Google Tag Manager → Install
- From the “Connect Google Tag Manager” screen, enter your container ID in the field
- Click Connect
Once connected, your container will be embedded on the checkout, and you will be able to inject tracking scripts that listen to the events pushed on the data layer and track them in your own systems.
Be cautious about third-party and custom scripts you include in your container, as invalid and misconfigured scripts can have undesired effects on your checkout. You are responsible for the scripts you embed and their effects.
While gaiia is happy to assist with the initial installation and setup of the integration, gaiia is unable to provide technical support for further configuration, troubleshooting, or customization of your GTM container. For additional assistance, gaiia recommends consulting the Google Tag Manager Help Center or your internal development team.
Object structure
The events will be pushed to the window.dataLayer object with the following structure:
{
event: 'event.name',
orderId: 'xxxx-xxxx-xxxx-xxxx',
orderMetadata: {
urlParams: {
fbclid: 'value',
anotherGetParam: 'value'
},
},
isEmbedMode: false,
flags: {
useOnePageCheckout: false
},
currentStep: 'CHECKOUT_STEP_IDENTIFIER',
cart: {
internetPlan: {
id: 'product-version-id',
name: 'Displayed product name',
slug: 'product-slug',
currency: 'USD',
isRecurring: true,
isProductTaxInclusive: false,
priceInCents: 8500,
downloadSpeedInKbps: 25000,
uploadSpeedInKbps: 800
},
internetPlanActivationFee: {
id: 'product-version-id',
name: 'Displayed product name',
slug: 'product-slug',
currency: 'USD',
isRecurring: true,
priceInCents: 400
},
internetRouter: {
id: 'product-version-id',
name: 'Displayed product name',
slug: 'product-slug',
currency: 'USD',
isRecurring: true,
isProductTaxInclusive: false,
priceInCents: 8500,
},
residentialPhonePlan: {
id: 'product-version-id',
name: 'Displayed product name',
slug: 'product-slug',
currency: 'USD',
isRecurring: true,
isProductTaxInclusive: false,
priceInCents: 8500,
},
mobilePhonePlan: {
id: 'product-version-id',
name: 'Displayed product name',
slug: 'product-slug',
currency: 'USD',
isRecurring: true,
isProductTaxInclusive: false,
priceInCents: 8500,
},
televisionPlan: {
id: 'product-version-id',
name: 'Displayed product name',
slug: 'product-slug',
currency: 'USD',
isRecurring: true,
isProductTaxInclusive: false,
priceInCents: 8500,
}
},
monthlySubtotalInCents: 80000,
monthlyTotalInCents: 90000
}
-
event- the event name, described in the list below, -
orderId- once the order ID is generated (starting at the start checkout/email capture step), this will be populated with the order UUID. will be undefined otherwise, and will be appended on all events. -
orderMetadata.urlParams- object with the URL parameters the checkout was invoked with. It will be appended to all events. -
isEmbedMode- true if the checkout URL contains/embed/orembed=trueand the checkout is loaded in an iframe, false otherwise. It will be appended to all events. -
flags.useOnePageCheckout- true if the single-screen checkout layout is used, false otherwise. It will be appended to all events. -
email- the prospect's email. It will be appended to all events once it is known. -
accountId/accountReadableId- the account's UUID and its Account ID. They will be appended to all events once the order is submitted. -
addressId- geo ID of the service address. It will be appended to all events once it is known. -
currentStep- identifier of the checkout step the event was fired on. Will not be appended to all events. Can be one of those values:PLAN_SERVICE_ADDRESS PLAN_FEATURED_SELECTION PLAN_INTERNET_PLAN_SELECTION PLAN_ROUTER_SELECTION PLAN_TELEVISION_PLAN_SELECTION PLAN_MOBILE_PHONE_PLAN_SELECTION PLAN_RESIDENTIAL_PHONE_PLAN_SELECTION PLAN_ADDITIONAL_SERVICES_SELECTION SETUP_START_CHECKOUT SETUP_ACTIVATION_DATE SETUP_MOBILE_PHONE_ACTIVATION SETUP_RESIDENTIAL_PHONE_ACTIVATION CHECKOUT_PERSONAL_INFORMATION CHECKOUT_PAYMENT_DETAILS REVIEW_CONFIRMATION SUCCESS_CLIENT_PORTAL_SIGNUP
-
cart- details of the selected products (internetPlan,internetPlanActivationFee,internetRouter,residentialPhonePlan,mobilePhonePlanandtelevisionPlan). It will not be appended to all events.-
id- ID of the product-version -
slug+name- slug/name of the product -
currency- currency code for the product -
isRecurring- true if the product is to be billed recurring, false if it's one-time -
isProductTaxInclusive- true if the price is to be displayed with the tax included, false if it's displayed with the tax excluded -
priceInCents- price for the product, in cents -
uploadSpeedInKbps/downloadSpeedInKbps- for internet plans only
-
-
monthlySubtotalInCents/monthlyTotalInCents- monthly total before and after taxes. It will not be appended to all events.
Events
The checkout pushes the events below to the data layer, grouped by the part of the checkout they relate to. Unless an event's description says otherwise, it includes currentStep, cart and the monthly totals.
Address and serviceability
| Event | Event description |
|---|---|
address.serviceable |
Pushed when the product availability query returned products, meaning the lead is qualified/eligible. Won't include the cart and totals.address - the address that was provided |
address.unserviceable |
Pushed when the product availability query returned no products for the address, and the address is not in a planned service area. Won't include the cart and totals.address - the address that was providedunserviceableAddressId - ID of the unserviceable address entity |
address.unserviceable.submit_email |
Pushed when the prospect leaves its email for follow-up on the unserviceable address form. Won't include the cart and totals.unserviceableAddressId - ID of the unserviceable address entity that had the email appended |
address.unserviceable.planned_service_area |
Pushed when the product availability query returned no products for the address, and the address is in a planned service area. Won't include the cart and totals.address - the address that was providedunserviceableAddressId - ID of the unserviceable address entity |
address.unserviceable.planned_service_area.submit_email |
Pushed when the prospect leaves their contact details on the planned service area form. Won't include the cart and totals.unserviceableAddressId - ID of the unserviceable address entity that had the contact details appended |
address.unserviceable.planned_service_area.order.resume |
Pushed when a prospect comes back through a link tied to a previously unserviceable address, and the address is now serviceable.unserviceableAddressId - ID of the original unserviceable address |
planCategories.available |
Pushed when the product availability query returns, listing which product types can be ordered at the address. Won't include the cart and totals.availableProductTypes - product types available at the address. Can be any of INTERNET, MOBILE_PHONE, RESIDENTIAL_PHONE and TELEVISION
|
planCategories.selected |
Pushed when the prospect confirms the product types they want in the plan category side panel. Won't include the cart and totals.interestedProductTypes - product types the prospect selected |
Plan and product selection
| Event | Event description |
|---|---|
internetPlan.select |
Pushed when the internet plan selection is changed on the internet plan step.internetPlan - same format as the cart.internetPlan key described above |
router.select |
Pushed when the router selection is changed on the router step.router - same format as the cart.internetRouter key described above |
mobilePhonePlan.select |
Pushed when the mobile phone plan selection is changed to a different product. Won't include the cart and totals.mobilePhonePlan - same format as the cart.mobilePhonePlan key described above |
residentialPhonePlan.select |
Pushed when the residential phone plan selection is changed to a different product. Won't include the cart and totals.residentialPhonePlan - same format as the cart.residentialPhonePlan key described above |
televisionPlan.select |
Pushed when the television plan selection is changed to a different product. Won't include the cart and totals.televisionPlan - same format as the cart.televisionPlan key described above |
addOn.select |
Pushed once for each newly selected add-on. Won't include the cart and totals.addOn - the selected add-on, in the same format as the cart products described above |
Broadband facts labels
| Event | Event description |
|---|---|
broadband_facts_labels.open_side_panel |
Pushed when the side-panel with broadband facts is opened. |
broadband_facts_labels.select |
Pushed when an internet plan is selected in the side panel.id - ID of the broadband facts labelplan - name of the plan, as displayed in the list |
broadband_facts_labels.view_page |
Pushed when a broadband facts label is viewed on the dedicated page via a permalink. Won't include the cart, totals, orderId, or current step.id - ID of the broadband facts labelplan - service plan name field of the label |
External purchase
These events are pushed when a plan tile sends the prospect to an external purchase link.
| Event | Event description |
|---|---|
externalPurchase.modal.open |
Pushed when the prospect clicks the external purchase button and the confirmation dialog opens. |
externalPurchase.modal.cancel |
Pushed when the prospect cancels the confirmation dialog. |
externalPurchase.modal.continue |
Pushed when the prospect continues from the confirmation dialog, and the external link opens in a new tab. |
Checkout steps
| Event | Event description |
|---|---|
step.change |
Pushed when the checkout changes steps. Won't include the current step.from - identifier of the previous stepto - identifier of the step that was changed to |
step.first_time_complete |
Pushed whenever the checkout changes step, resulting in the previous step being completed for the first time. Won't include the current step.step - identifier of the step |
step.back |
Pushed whenever the user goes back a step.from - identifier of the current stepto - identifier of the step the user is going back to |
Payment
| Event | Event description |
|---|---|
payment_method.add |
Pushed when a payment method is added in the billing details step.type - "credit_card" or "bank_account"authorizeAutomaticPayments - true if the auto payment checkbox was checked, false otherwise |
payment_method.clear |
Pushed when the payment method is cleared from the billing details step. |
Order
| Event | Event description |
|---|---|
order.resume |
Pushed when the order is resumed from an order resume link.orderId - ID of the order that was resumed |
order.ready_to_submit |
Pushed once, when every required step of the checkout is complete. |
order.submit |
Pushed when the order is successfully submitted. |
order.success |
Pushed once, when the order succeeds and an account exists. |
order.success.client_portal_signup |
Pushed when the customer signs up for the client portal on the success screen. |
- Tag_manager.png40 KB