An Event is an action that takes place in your web or mobile application that allows you to track their behavior. Examples of Events are:

  • Visiting a page
  • Clicking or interacting with a button
  • Scrolling to a specific point on a page
Survey TriggerEvents can be used to Trigger or launch a Microsurvey. It causes your survey to appear.
FilteringEvents, like Attributes, can also be used as Filters for a Microsurvey that allow you to further refine who is eligible (target cohorts) for answering the Microsurvey.

Managing Events

To add, view, edit or delete an Event, you’ll need to consider which platform you’ll use to deliver the survey.

Add Events

Sprig Web and Mobile surveys rely on event tracking and user behavior to accurately deliver surveys at configurable intervals. Email and Link surveys do not require the use of events for triggering as they rely on information about your customers that you manage outside of Sprig. Event tracking in Sprig is described as either No Code or Code.

The No Code event type is reserved for your Web surveys only and provides support for three different types of triggering and filtering described as Page URL, Inner Text and CSS Selector.

The Code event type is available for both Web and Mobile surveys using the respective SDKs, APIs or Integrations. Inside of the Sprig UI you may, optionally, add a Code event by giving it a Name and a Description which helps with reuse later but is not a required set of steps. However, if you do use the UI to enable the Code event you must have an identically named event “tracked” via the Web SDK, Mobile SDK, API, Google Tag Manager, Segment or mParticle. Alternatively, you can just name or track the event with a simple snippet with the aforementioned options, without having also add the name via the Sprig UI.

Via the UI

Sprig provides the ability to add an event through the UI and describes it as either a No Code or Code Event Type.

The No Code event type is reserved for your Web surveys only and provides support for three different types of triggering and filtering described as Page URL, Inner Text and CSS Selector.

The Code event type is available for both Web and Mobile applications. Inside of the Sprig UI you may, optionally, add a Code event by giving it a Name and a Description which helps with reuse later but is not a required set of steps. The benefit of using the UI to create a Code event is that it also makes copying and sharing the JavaScript snippet needed per event easier for your engineering team after you’ve named it. If you do use the UI to name a Code event, you must have an identically named event “tracked” via the Web SDK, Mobile SDK, API, Google Tag Manager, Segment or mParticle.

No Code

  1. Choose a page or a button on your website or web application.
  2. Keep that page open as you navigate to the next step; you're going to need to copy information from this page into the Sprig application.
  3. Open the Sprig application.
  4. In the Navigation Pane, click Events.
  5. Click Add.
  6. Click No Code event.
  7. Click Page URL based on page loading or Inner Text for a trigger based on a button, link, or UI element event on the page, else CSS to select the class. To include or exclude certain pages, explore using Regular Expressions.
  8. In the Name field, enter the Event name.
  9. In the Description field, enter the Event description.
  10. If Page URL was clicked, in the URL Pattern field, enter the Page URL.
  11. If InnerText was clicked, in the InnerText field, enter the inner text of the element.
  12. Click Save.

Code

  1. In the Navigation Pane, click Events.

  2. Click Add.

  3. Click Code Event.

  4. In the Name field, enter the Event name.

    ️ Warning

    The Name must match the same name that you use in the Web SDK, Mobile SDK, Google Tag Manager or mParticle.

  5. In the Description field, enter the Event description.

  6. Click Save. You’ll be redirected to the Events page.

  7. Locate the Event you just created.

  8. Select the Event row.

  9. Toggle between JavaScript, iOS or Android to see the snippet that your engineers will need depending on which survey delivery platform you’re planning to use the Event on and share that snippet with engineering. Direct them to the Connect section of the docs for more information on that specific platform as well as how to locate the Environment ID

Via the Web SDK, Google Tag Manager or mParticle

Sprig provides the ability to add an event that can be used as a Survey Trigger or Filter through the Web SDK, Google Tag Manager and mParticle and describes this as an Event Type called Code.

When using the Web SDK, Google Tag Manager or mParticle you can also use the Sprig UI to add an event type called No Code. The No Code event type provides support for three different types of triggering and filtering described as Page URL, Inner Text and CSS Selector. To learn more about No Code events, please visit No Code via the UI

Via the Mobile SDK

Sprig provides the ability to add an event that can be used as a Survey Trigger or Filter through the Mobile SDKs and describes this as an Event Type called Code.

Via the API and Segment

Recall that events are used as both a Survey Trigger as well as a Filter. In the case of the API and the Segment integration, if you add or create an event via the API or Segment it can only be used as a Filter. A survey's filter is used to further target a cohort of users on a given microsurvey, as opposed to triggering the survey.

📘

Info

Segment events can only be used as survey filters in Sprig, not survey triggers. Because Segment events can be received on a delay and do not guarantee a real-time interaction with your visitors, they cannot be used to trigger a survey. Sprig continues to press for this capability directly with Segment on your behalf and we'd encourage you to contact them as well. The Sprig/UserLeap SDK needs to be installed on your web or mobile application and should handle any trigger events for surveying within your product. You typically only need 3 - 5 events for 80% of your surveying needs.

Edit Events

  1. In the Navigation Pane, click Events
  2. Click the three ellipses on the Event that you want to edit
  3. Select Edit

📘

Info

For No Code event types, the event Name cannot be edited. The Name is considered unique and must be reserved. The trigger interaction can be toggled between Page URL, InnerText and CSS. The Page URL pattern can also be edited.

📘

Info

For Code event types, the event Name cannot be edited. The Name is considered unique and must be reserved. Only the Description of the event can be modified.

Delete Events

Deleting an event is a permanent action, and it cannot be recovered. Events cannot be deleted when attached to an active survey. You will need to pause, archive or complete the survey that is using the event in order to delete the event.

  1. In the Navigation Pane, click Events
  2. Click the three ellipses on the event that you want to edit
  3. Select Delete
  4. Select Delete a second time when prompted.

View Events

  1. In the Navigation Pane, click Events

Sort Events

  1. In the Navigation Pane, click Events
  2. Click on the column header to sort the Events
  3. Click on the column header a second time to reorganize the sorting order of the Events

Filter and Search for Events

  1. In the Navigation Pane, click Events
  2. Navigate to the input field, begin typing a value to filter or search for the filter

Inspect or Diagnose Events

  1. To learn more about how often the event is firing, hover over the diagnostic icon in the Daily Usage column.
  2. If the diagnostic icon is grey, your event is either not added correctly or has been turned off from your website, web application or mobile application.
  3. If the diagnostic icon is green, your event is being tracked and is available for triggering or filtering a microsurvey. As it is tracked it is then enumerated by hours, days and weeks.

Do you have feedback about managing Events? Tell us more.