Triggers allow you to track the behavior of different elements on a web page. For example, if you select a button as a trigger, then every time the button is clicked, Google Tag Manager registers this action. 

You must create the following triggers to track the booking of an appointment: 

  1. Home Page
  2. Book Appointment Button
  3. Confirm Booking Button
  4. Thank You Page

To create the home page trigger

  1. Log in to Google Tag Manager.
    Google Tag Manager dashboard appears. 
  2. Select Triggers in the side menu.
    The existing triggers table appears.
  3. Click New.
    The Untitled Trigger window opens.
  4. Enter the name for the trigger as Home Page
  5. Click Trigger Configuration.
    The Choose Trigger Type side window opens.
  6. Select the trigger type as Page View.

        This Trigger Fires On setting appears.
    7. Select Some Page Views.
        The Event Condition dropdown appears.
   8. Select Page Path from the first condition dropdown.
   9. Select Contains from the second condition dropdown.
  10. Enter /webstoreNew in the third column. 



11. Click Save.
    The Home Page trigger is now created.

To create the book appointment button trigger

  1. Select Triggers in the side menu.
    The existing triggers table appears.
  2. Click New.
    The Untitled Trigger window opens.
  3. Enter the name for the trigger as Book Appointment Button
  4. Click Trigger Configuration.
    The Choose Trigger Type side window opens.
  5. Select the trigger type as Click - All Elements

       This Trigger Fires On setting appears.
  6. Select Some Clicks.
       The Event Condition dropdown appears.
  7. Select Choose Built-In Variable from the first condition dropdown.
      The Built-In Variables side window opens.
  8. Select Click ID.
  9. Select contains from the second condition dropdown.
 10. Enter ws_bookreservation in the third column. 

 11. Click Save.
      The Book Appointment Button trigger is now created.

To create the confirm booking button trigger

  1. Select Triggers in the side menu.
    The existing triggers table appears.
  2. Click New.
    The Untitled Trigger window opens.
  3. Enter the name for the trigger as Confirm Booking Button.
  4. Click Trigger Configuration.
  5. Select the trigger type as Click - All Elements.

    This trigger fires on setting appears.
6. Select Some Clicks.
     The Event Condition dropdown appears.
7. Select Click ID from the first condition dropdown.
8. Select contains from the second condition dropdown.
9. Enter wsConfirmBook in the third column.

10. Click Save.
      The Confirm Booking Button trigger is now created. 

To create the Thank You page trigger

  1. Select Triggers in the side menu.
    The existing triggers table appears.
  2. Click New.
    The Untitled Trigger window opens.
  3. Enter the name for the trigger as Thank You page.
  4. Select the trigger type as Element Visibility.

    More settings appear.
5. Select ID in the Selection Method dropdown.
6. Select thankYouContainer for Element ID.
7. Select Every time an element appears on screen radio button for When to fire this trigger.
8. Select 50 as the Minimum Percent Visible value.
9. Select Observe DOM changes checkbox.
10. Select All Visibility Events radio button for This trigger fires on setting.

11. Click Save.
    The ThankYou page trigger is now created. 

Next Step: Create Variables for Tracking the Booking of an Appointment.

See Also

Google Analytics and Google Tag Manager: Overview

Did this answer your question?