Skip to content

Commit

Permalink
add adobe anyl
Browse files Browse the repository at this point in the history
  • Loading branch information
hemarina committed Feb 1, 2024
1 parent a8ba578 commit 19582d5
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://msasg.pkgs.visualstudio.com/_packaging/1DS-SDK/npm/registry/
always-auth=true
116 changes: 116 additions & 0 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"node": ">=18.0"
},
"dependencies": {
"@microsoft/1ds-analytics-web-js": "^3.2.15",
"@popperjs/core": "^2.11.8",
"scheduler": "^0.20.2",
"search-insights": "^2.11.0"
Expand Down
30 changes: 30 additions & 0 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment";
import styles from "./styles.module.css";
import { useColorMode } from "@docusaurus/theme-common";
import ShowcaseCardPage from "./ShowcaseCardPage";
import { ApplicationInsights } from "@microsoft/1ds-analytics-web-js";

initializeIcons();

Expand Down Expand Up @@ -62,6 +63,35 @@ const App = () => {
};

export default function Showcase(): JSX.Element {
const analytics: ApplicationInsights = new ApplicationInsights();

var config = {
instrumentationKey:
"41c1099574f14f06bdce4f80fcd0a65c-4a29467c-f5d4-4151-8e8b-62c0a3515947-7118",
channelConfiguration: {
// Post channel configuration
eventsLimitInMem: 5000,
},
propertyConfiguration: {
// Properties Plugin configuration
userAgent: "Custom User Agent",
},
webAnalyticsConfiguration: {
// Web Analytics Plugin configuration
autoCapture: {
scroll: true,
pageView: true,
onLoad: true,
onUnload: true,
click: true,
resize: true,
jsError: true,
},
},
};
//Initialize SDK
analytics.initialize(config, []);

return (
<Layout>
<App />
Expand Down

0 comments on commit 19582d5

Please # to comment.