PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 All 128 releases
← All changes | src/AutoLaunch/functions/insights.js +2 -14 3.2.1 → 3.2.2 View file →
@@ -1,7 +1,8 @@
1 1 import { useLaunchDataStore } from '@auto-launch/state/launch-data';
2 2 import { INSIGHTS_HOST } from '@constants';
3 3 import { reqDataBasics } from '@shared/lib/data';
4 +import { track } from '@shared/lib/track';
4 5 import apiFetch from '@wordpress/api-fetch';
5 6
6 7 const headers = {
7 8 'Content-type': 'application/json',
@@ -87,19 +88,6 @@
87 88
88 89 export const reportRestApiStatus = async () => {
89 90 const reason = await probeFailureReason();
90 91 if (!reason) return;
91 - const { siteId, partnerId, homeUrl, siteCreatedAt } = reqDataBasics;
92 - return fetch(`${INSIGHTS_HOST}/api/v1/event`, {
93 - method: 'POST',
94 - headers,
95 - body: JSON.stringify({
96 - insightsId: siteId,
97 - key: 'rest_api_unreachable',
98 - payload: { reason },
99 - partnerId,
100 - siteURL: homeUrl,
101 - siteCreatedAt,
102 - }),
103 - keepalive: true,
104 - });
92 + track('rest_api_unreachable', { reason });
105 93 };