const trackEvent = function trackEvent(opts) {
  const {
    app,
    eventLabel,
    abTestingId,
    abTestingLabel
  } = opts;
  if (window.utag) {
    window.utag.link({
      event_type: 'interactives_interaction',
      interaction_name: `interactives:${app}:${eventLabel}`,
      ab_test_name: abTestingId,
      ab_test_interaction: abTestingLabel
    });
    return true;
  }

  // eslint-disable-next-line no-console
  console.warn('Utag not loaded. Interaction not tracked.');
  return false;
};
export default trackEvent;