From 748efecccf7e2d8e973d0e73c3796f9393eed8ec Mon Sep 17 00:00:00 2001 From: Joseph McElroy Date: Mon, 9 Jan 2023 14:50:38 +0000 Subject: [PATCH] [Enterprise Search] [Behavioral Analytics] Fix onboarding docs (#147761) This PR addresses these typos with behavorial analytics onboarding documentation. --- ...ction_integrate_javascript_client_embed.tsx | 18 +++++++++--------- ...analytics_collection_integrate_searchui.tsx | 10 ++++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx index 3d9988fef12ea..8c90f8753f22a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx @@ -58,10 +58,10 @@ export const javascriptClientEmbedSteps = (analyticsDNSUrl: string) => [

{`import { -createTracker, -trackPageView, -trackEvent, -} from "@elastic/behavioural-analytics-javascript-tracker";`} + createTracker, + trackPageView, + trackEvent, +} from "@elastic/behavioral-analytics-javascript-tracker";`} @@ -82,7 +82,7 @@ trackEvent, 'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.javascriptClientEmbed.stepThree.description', { defaultMessage: - ' Use createTracker method to initialize the tracker with your DSN. You will then be able to use the tracker to send events to Behavioural Analytics.', + ' Use createTracker method to initialize the tracker with your DSN. You will then be able to use the tracker to send events to Behavioral Analytics.', } )}

@@ -91,7 +91,7 @@ trackEvent, 'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.javascriptClientEmbed.stepThree.descriptionTwo', { defaultMessage: - 'Once you have called createTracker, you can use the tracker methods such as trackPageView to send events to Behavioural Analytics.', + 'Once you have called createTracker, you can use the tracker methods such as trackPageView to send events to Behavioral Analytics.', } )}

@@ -119,7 +119,7 @@ trackEvent, 'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.javascriptClientEmbed.stepFour.description', { defaultMessage: - 'Once you have called createTracker, you can use the tracker methods such as trackPageView to send events to Behavioural Analytics.', + 'Once you have called createTracker, you can use the tracker methods such as trackPageView to send events to Behavioral Analytics.', } )}

@@ -153,13 +153,13 @@ const SearchPage = (props) => { 'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.javascriptClientEmbed.stepFour.descriptionThree', { defaultMessage: - 'You can also dispatch custom events to Behavioural Analytics by calling the trackEvent method.', + 'You can also dispatch custom events to Behavioral Analytics by calling the trackEvent method.', } )}

{`// track a custom event in React -import { trackEvent } from '@elastic/behavioural-analytics-javascript-tracker'; +import { trackEvent } from '@elastic/behavioral-analytics-javascript-tracker'; const ProductDetailPage = (props) => { diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_searchui.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_searchui.tsx index b12dbc6e45773..cae8799544033 100644 --- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_searchui.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_searchui.tsx @@ -106,7 +106,7 @@ export const searchUIEmbedSteps = (setSelectedTab: (tab: TabKey) => void) => [ 'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.searchui.stepTwo.setupDescription', { defaultMessage: - 'Finally, add the plugin to your Search UI configuration. Depending on how you have embedded Behavioural analytics, you may need to pass in the client. The example below shows how to pass in the client when using the Javascript client.', + 'Finally, add the plugin to your Search UI configuration. Depending on how you have embedded Behavioral analytics, you may need to pass in the client. The example below shows how to pass in the client when using the Javascript client.', } )}

@@ -116,9 +116,11 @@ import { getTracker } from "@elastic/behavioral-analytics-tracker"; const searchUIConfig = { ... -plugins: [AnalyticsPlugin( -client: getTracker(); -)], +plugins: [ + AnalyticsPlugin({ + client: getTracker(); + }) +], ... }`}