Skip to content

Commit

Permalink
[Enterprise Search] [Behavioral Analytics] Fix onboarding docs (#147761)
Browse files Browse the repository at this point in the history
This PR addresses these typos with behavorial analytics onboarding documentation.
  • Loading branch information
joemcelroy authored Jan 9, 2023
1 parent 1c0372c commit 748efec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export const javascriptClientEmbedSteps = (analyticsDNSUrl: string) => [
</p>
<EuiCodeBlock language="bash" isCopyable>
{`import {
createTracker,
trackPageView,
trackEvent,
} from "@elastic/behavioural-analytics-javascript-tracker";`}
createTracker,
trackPageView,
trackEvent,
} from "@elastic/behavioral-analytics-javascript-tracker";`}
</EuiCodeBlock>
</EuiText>
</>
Expand All @@ -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.',
}
)}
</p>
Expand All @@ -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.',
}
)}
</p>
Expand Down Expand Up @@ -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.',
}
)}
</p>
Expand Down Expand Up @@ -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.',
}
)}
</p>
<EuiCodeBlock language="javascript" isCopyable>
{`// 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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
}
)}
</p>
Expand All @@ -116,9 +116,11 @@ import { getTracker } from "@elastic/behavioral-analytics-tracker";
const searchUIConfig = {
...
plugins: [AnalyticsPlugin(
client: getTracker();
)],
plugins: [
AnalyticsPlugin({
client: getTracker();
})
],
...
}`}
</EuiCodeBlock>
Expand Down

0 comments on commit 748efec

Please sign in to comment.