DOCUMENTATION

Documentation

REST and AJAX Reference

REST and AJAX Reference

The plugin exposes public ingest endpoints for frontend tracking and protected read endpoints for administrators or authenticated integrations.

BH REST endpoints

Endpoint Method Permission Purpose
/wp-json/wpmc-bh/v1/ingestPOSTPublic with server guardsStore BH event batches.
/wp-json/wpmc-bh/v1/aggregateGETmanage_optionsReturn heatmap buckets for page/device/date filters.
/wp-json/wpmc-bh/v1/elementsGETmanage_optionsReturn clicked elements grouped by label hash and selector.
/wp-json/wpmc-bh/v1/navigationGETmanage_optionsReturn navigation destinations and counts.
/wp-json/wpmc-bh/v1/pointsGETmanage_optionsReturn raw click points for rendering.

BH AJAX endpoints

  • wpmc_bh_ingest and legacy alias wpmc_rt_ingest: store BH event batches.
  • wpmc_bh_aggregate and legacy alias wpmc_rt_aggregate: protected heat bucket aggregation.
  • wpmc_bh_elements and legacy alias wpmc_rt_elements: protected element aggregation.
  • wpmc_bh_navigation: protected navigation destination summary.
  • wpmc_bh_totals: protected click, navigation, and CTA totals.
  • wpmc_bh_scroll_depth: protected scroll-depth breakdown from wpmc_views.
  • wpmc_bh_points: protected raw point list.

Classic behavior AJAX endpoints

  • wpmc_extended_save_view: stores view and session context.
  • wpmc_extended_save_view_scroll: updates scroll depth for the latest matching view.
  • wpmc_track_duration: updates duration for the latest matching view and session end time.
  • wpmc_get_online_users: admin-only online user count.
  • wpmc_reset_data: admin-only reset for a specific page URL.
  • wpmc_clean_page: admin-only per-page cleanup across selected table groups.

WPMissionControl integration endpoints

  • /wp-json/wpmc/v1/behavior/status: returns tracking status, integration state, table status, and data availability.
  • /wp-json/wpmc/v1/behavior/summary: returns date-range behavior metrics, comparisons, trends, devices, referrers, top pages, source performance, and opportunities.
  • Allowed summary ranges are 7, 30, or 90 days when using the days parameter. Custom from and to must use YYYY-MM-DD and cannot exceed 90 days.