Skip to content

Commit

Permalink
Move to the edgio latest.js script
Browse files Browse the repository at this point in the history
  • Loading branch information
petrvecera committed Jun 2, 2024
1 parent cbf7844 commit accf38d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
1 change: 0 additions & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"dependencies": {
"@ant-design/icons": "4.7.0",
"@ant-design/plots": "1.2.6",
"@edgio/rum": "7.0.13",
"@nivo/bar": "0.72.0",
"@nivo/core": "0.72.0",
"@nivo/geo": "0.72.0",
Expand Down
21 changes: 15 additions & 6 deletions packages/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<script defer>
function initEdgioRum() {
new Edgio.Metrics({
token: "cdbeca7f-be87-45d8-a36a-0ba520f1ec5c",
}).collect();
}
</script>
<script src="https://rum.edgio.net/latest.js" defer onload="initEdgioRum()"></script>

<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand All @@ -72,14 +81,14 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
6 changes: 0 additions & 6 deletions packages/web/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ import "./index.css";
import Root from "./root";
import analytics from "./analytics";
import "firebase/compat/firestore";
import { Metrics } from "@edgio/rum";

import { firebase } from "./firebase";

firebase.init();
// Initialize Firebase

// Collect RUM metrics
new Metrics({
token: "cdbeca7f-be87-45d8-a36a-0ba520f1ec5c",
}).collect();

const history = createBrowserHistory();
history.listen(analytics.pageView);

Expand Down

0 comments on commit accf38d

Please sign in to comment.