Skip to main content
Loading...
Skip to article
  • Qualtrics Platform
    Qualtrics Platform
  • Customer Journey Optimizer
    Customer Journey Optimizer
  • XM Discover
    XM Discover
  • Qualtrics Social Connect
    Qualtrics Social Connect

Adding Event Tracking & Triggering


Was this helpful?


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!


Qtip: If you don’t have access to any of the features described on this page, reach out to your Account Executive. For more information about the differences between Digital Feedback and CustomerXM for Digital, see Digital Feedback vs. CustomerXM for Digital.

About Event Tracking & Triggering

With event tracking, your intercept will detect specific events on your website. Events might include visitor actions like downloading a monthly statement on a banking website, clicking to chat with a live agent on a commerce site, and more. Once captured, a record of these events is saved in a cookie on the participant’s browser so that this information can be used for Intercept logic or sent to your target website as embedded data.

In addition to this, when a visitor qualifies for your intercept, you can trigger events like editing, adding, or removing a cookie or Google Analytics event.  You can set these events to happen when the creative loads, or when a visitor interacts with your creative in a specific way. This is known as event triggering.

Qtip: This page shows how to set up event tracking in a standalone intercept, but it can also be added to projects that use the guided setup.

Basic Event Tracking

If the elements on your website you’d like to track have HTML IDs, and if you are tracking clicks (as opposed to other events, such as hovering), you can quickly set up event tracking with no website modifications needed.

Example: On this website, we’d like to track visitors who click on the checkout button. Because the checkout button contains an HTML ID, Qualtrics can track this with no site modifications needed.

image04

To set up basic event tracking

  1. Under the Intercepts section, open the Intercepts tab and select the Intercept to which you would like to add event tracking.
    Choosing an intercept from the Intercepts tab

    Qtip: If you’re using the project deployment code, events tracked by one Intercept can be accessed by another. There is no need to add the same event tracking to multiple intercepts.
  2. Click Manage.
    image of the manage and event tracking options in the intercept tab
  3. Select Event Tracking.
  4. Type the name you would like to use for your event (any name will do).
    image of the event tracker editing screen
  5. Enter the exact HTML ID of the element you would like to track.
  6. To include additional events, click the plus (+) sign to the right of your event.
  7. Click Save.

Advanced Event Tracking

If you would like to track events on your website that do not involve a visitor clicking (e.g., hovering over an item), or if you would like to track interaction with elements that don’t have an HTML ID, you can manually add the event tracking code to these elements on your website. These added codes will allow Qualtrics to know when the event has taken place.

Attention: Advanced event tracking requires a basic knowledge of HTML and JavaScript, as well as access to modify your website’s source code. Unfortunately, Qualtrics Support cannot advise you on custom coding. You can always try asking our community of dedicated users instead.

To track an event on your website

  1. Identify the HTML element on your site you would like to track (the following example does not include an ID attribute).
    <span>Chat with an agent.</span>
  2. Add a JavaScript event to this element. Common events include onclick, onmouseover, or onmouseout.
    <span onclick=”...”>Chat with an agent.</span>
  3. Set the event equal to the following code:
    window._qsie = window._qsie || [];window._qsie.push('eventName');
  4. The final HTML for your element may look something like this:
    <span onclick=”window._qsie = window._qsie || [];
    window._qsie.push('InitiatedChat');”>Chat with an agent.</span>
  5. You can now add Intercept Display Conditions that target this event.
    The condition says that if the location is California, the Current URL has products in it, and if Event Tracking InitiatedChat is Greater Than 1, the Creative will display.

    Example: In the image above, the event is a chat being initiated on the website. The name of the event, as defined in step 4, is InitiatedChat. 1 is the value that indicates this act is not yet initiated, whereas anything above that indicates an action has taken place. So the condition reads, “If Event Tracking InitiatedChat is Greater Than 1,” the creative will display.

Using Tracked Events

Once you have set up event tracking, you can use these events in your targeting logic. You can also send event tracking information over to your target website or survey using Embedded Data.

To add logic based off of an event

  1. On either the intercept targeting-level or the action set-level, add logic.
    The Add Intercept Display Logic button to the top-left of all action sets, and the Change/Add Logic button inside each and every action set
  2. Drop the first field down.
    First field of logic is dropped down, from the Website menu Event Tracking is selected
  3. Select Website and choose Event Tracking.
  4. Enter the name of your event.
    The condition says the Creative will appear if Event Tracking checkout event is greater than or equal to 1
  5. Select whether it will be Greater Than, Equal To, etc. the value you enter in the next step.
  6. Enter an event value, which will be the number of times the event must happen for the participant to qualify.

To save event information as Embedded Data

Event data can also be saved as embedded data, as described on the Embedded Data in Website Feedback page.

Embedded data name is co event and value is event tracking set to checkout event

In the Name field on the left, you’ll enter the name of the embedded data field, which can be anything you like. You’ll then set the value to Event Tracking and enter the event name as it’s saved on your website.

The final embedded data value sent over to your target website will be the number of times the event occurred for that particular visitor.

Triggering an Event

There are two ways to trigger an event. The first is to trigger an event as soon as your creative is displayed to a website visitor. The second is to trigger an event as soon as a website visitor interacts with a specific element in your creative. The following sections outline how to accomplish both triggers.

To trigger events on creative display

  1. Navigate to the relevant action set within the Intercept that displays your creative and click Options.
    Options is selected on the far-right of an actions toolbar, revealing the Add Event option
  2. Select Add Event.
  3. Select the type of event you’d like to add. These options allow you to Add/Modify and Remove Cookies, as well as push an event to Google Analytics.
    Select Event window where the first field is dropped down to reveal Remove cookie, add modify cookie, and google analytics event

    Qtip: Learn more about these options in the Defining an Event section below
  4. Type the name you would like to use for your event (any name will do).
  5. Enter the value.
  6. If desired, click the plus (+) sign to add another event.
  7. Once you have set up the event(s), click Save.

To trigger an event when a visitor interacts with a creative

  1. Navigate to the Intercepts section.Choosing a creative from the Creatives tab
  2. Click on the Creatives tab and select the one you want to edit.
  3. Click the element on your creative that should trigger this event (e.g., specifically click the target or the background).Adding event tracking to a creative with the drop down menu in the top right
    Qtip: You may want to add the event to the target element to track individuals who click the target (see below), or to the Close button to track those who choose not to participate.
  4. Click the dropdown arrow in the toolbar.
  5. Select Add Event.
  6. Select what action will trigger the event. See below for available actions.
    Specifying the elements of the event tracker on a creative

    • On Click: The event will occur if the visitor clicks on this element of the Creative.
    • Mouse Out: The event will occur if the visitor hovers their mouse over this element of the Creative and then moves their mouse away.
    • Mouse In: This event will occur if the visitor hovers their mouse over this element of the Creative.
  7. Select the type of event you’d like to add. These options allow you to Add/Modify, Add JavaScript, Remove Cookies, as well as push an event to Google Analytics.
  8. Name the embedded data.
  9. Enter the value.
  10. If desired, click the plus (+) sign to add another event.
  11. Once you have set up the event(s), click Save.

Defining an Event

Once you’ve selected how your event is triggered, you can choose exactly what the event will be. There are three types of events available: Remove Cookie, Add/Modify Cookie, or trigger a Google Analytics Event.

Remove Cookie

With the Remove Cookie event, the Name should be the name of the cookie being removed, as defined on your site. If the visitor qualifies for this event and if the cookie exists in the browser, then the cookie will be removed.

Example: Once a visitor has clicked to redeem a coupon, you could remove the cookie that indicates they are eligible for promotions.

Selected Event window says the cookie named QualifiedVisitor will be removed on click

Add/Modify Cookie

With the Add/Modify event, a cookie will be added to the visitor’s browser. If the cookie already exists, then it will be modified. For this event, specify the name of the cookie you’d like to add/modify, and then specify the new value for that cookie.

Example: Once a visitor has clicked to take a survey, you could add a cookie flagging this visitor as someone ineligible for other campaigns.
The event is set so that the cookie StartSurvey will be added or modified on click
Qtip: The cookie saved in this event is a browsing session cookie. These are temporary cookie files, which are erased when you close your browser.

Google Analytics Event

With a Google Analytics Event, Intercept interactions can be recorded and reported within Google Analytics. For this event, specify the account number for your Google Analytics Account, as well as a Category and Action name for this event. Refer to Google’s Event Tracking page for more information.

The event is set so that a Google Analytics event is triggered

FAQs