Merge pull request #20569 from jboeijenga/chore/update-ga-dev-playgrounds

Updated GA plugin playgrounds
This commit is contained in:
Fredrik Adelöw
2023-11-07 10:18:34 +01:00
committed by GitHub
2 changed files with 30 additions and 15 deletions
+14 -2
View File
@@ -15,11 +15,23 @@
*/
import React from 'react';
import { createDevApp } from '@backstage/dev-utils';
import { analyticsModuleGA } from '../src/plugin';
import { Playground } from './Playground';
import {
analyticsApiRef,
configApiRef,
identityApiRef,
} from '@backstage/core-plugin-api';
import { GoogleAnalytics } from '../src';
createDevApp()
.registerPlugin(analyticsModuleGA)
.registerApi({
api: analyticsApiRef,
deps: { configApi: configApiRef, identityApi: identityApiRef },
factory: ({ configApi, identityApi }) =>
GoogleAnalytics.fromConfig(configApi, {
identityApi,
}),
})
.addPage({
path: '/ga',
title: 'GA Playground',