Answers Search UI - Disabling User Engagements (Summer '21 Release)

With the increasing importance of internet privacy, we’ve added additional support for storing user engagements with Answers. You will now find an analyticsEventEnabled boolean option to either enable or disable all user interaction events.

analyticsEventsEnabled is a top-level config option in the ANSWERS.init. If not specified, defaults to true.

ANSWERS.init({
    // Required, your Yext Answers API key
    apiKey: '<API_KEY_HERE>',
    // Required, the key used for your Answers experience
    experienceKey: '<EXPERIENCE_KEY_HERE>',
    onReady: function() {},
    // Optional, whether or not to submit user interaction analytics events
    analyticsEventsEnabled: true,
    // Optional*, Yext businessId, *required to send analytics events, should be set if analyticsEventsEnabled == false
    businessId: 'businessId',
    sessionTrackingEnabled: true,
    //etc
  })

It is also an option in the theme’s global_config.json.

{
  "sdkVersion": "1.8",
  // "apiKey": "<REPLACE ME>",
  // "experienceVersion": "<REPLACE ME>",
  // "businessId": "<REPLACE ME>",
  "logo": "",
  "favicon": "",
  "googleTagManagerName": "dataLayer",
  "googleTagManagerId": "",
  "googleAnalyticsId": "",
  "conversionTrackingEnabled": true, // Whether or not conversion tracking is enabled for all pages
  "analyticsEventsEnabled": true //Whether or not to submit user interaction analytics events 
}

When set to false, this configuration will prevent any user events from being submitted.

Upgrade Implications:
In order to adjust analyticsEventsEnabled, make sure to upgrade to theme 1.23!

:spiral_calendar: This feature is available in Early Access. Here’s how to use the Early Access branches of the Theme and SDK!