Merge pull request #20569 from jboeijenga/chore/update-ga-dev-playgrounds
Updated GA plugin playgrounds
This commit is contained in:
@@ -13,23 +13,26 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import {
|
||||
analyticsApiRef,
|
||||
configApiRef,
|
||||
identityApiRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { createDevApp } from '@backstage/dev-utils';
|
||||
import React from 'react';
|
||||
|
||||
import { GoogleAnalytics4 } from '../src';
|
||||
import { Playground } from './Playground';
|
||||
|
||||
import { createPlugin } from '@backstage/core-plugin-api';
|
||||
|
||||
/**
|
||||
* @deprecated Importing and including this plugin in an app has no effect.
|
||||
* This will be removed in a future release.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const analyticsModuleGA4 = createPlugin({
|
||||
id: 'analytics-provider-ga4',
|
||||
});
|
||||
createDevApp()
|
||||
.registerPlugin(analyticsModuleGA4)
|
||||
.registerApi({
|
||||
api: analyticsApiRef,
|
||||
deps: { configApi: configApiRef, identityApi: identityApiRef },
|
||||
factory: ({ configApi, identityApi }) =>
|
||||
GoogleAnalytics4.fromConfig(configApi, {
|
||||
identityApi,
|
||||
}),
|
||||
})
|
||||
.addPage({
|
||||
path: '/ga4',
|
||||
title: 'GA4 Playground',
|
||||
|
||||
Reference in New Issue
Block a user