diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate.test.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate.test.tsx
index f46454e45eb82..8564641dd71b6 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate.test.tsx
@@ -9,9 +9,11 @@ import '../../../__mocks__/shallow_useeffect.mock';
import React from 'react';
-import { shallow } from 'enzyme';
-
-import { EuiCodeBlock } from '@elastic/eui';
+import {
+ EuiCodeBlock,
+ EuiDescriptionListDescription
+} from '@elastic/eui';
+import { mount } from 'enzyme';
import { AnalyticsCollection } from '../../../../../common/types/analytics';
@@ -29,7 +31,18 @@ describe('AnalyticsCollectionIntegrate', () => {
});
it('renders', () => {
- const wrapper = shallow();
+ const wrapper = mount();
expect(wrapper.find(EuiCodeBlock)).toHaveLength(2);
+ expect(wrapper.find(EuiDescriptionListDescription).get(0)).toMatchInlineSnapshot(`
+
+ example
+
+ `);
+
+ expect(wrapper.find(EuiDescriptionListDescription).get(1)).toMatchInlineSnapshot(`
+
+ /analytics/api/collections/example
+
+ `);
});
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate.tsx
index ff5cdf9c5fee1..36b527097a304 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate.tsx
@@ -28,7 +28,7 @@ interface AnalyticsCollectionIntegrateProps {
export const AnalyticsCollectionIntegrate: React.FC = ({
collection,
}) => {
- const analyticsDNSUrl = getEnterpriseSearchUrl(`/analytics/${collection.name}`);
+ const analyticsDNSUrl = getEnterpriseSearchUrl(`/analytics/api/collections/${collection.name}`);
const credentials = [
{
title: i18n.translate(
@@ -111,9 +111,9 @@ export const AnalyticsCollectionIntegrate: React.FC
- {`window.elasticAnalytics.trackEvent("ResultClick", {
+ {`window.elasticAnalytics.trackEvent("click", {
title: "Website Analytics",
- url: "www.elasitc.co/analytics/website"
+ url: "www.elastic.co/analytics/overview"
})`}
>