-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move grafana faro to component, use preload for css, use SSR on main …
…landing page
- Loading branch information
1 parent
1bccb42
commit dc3493e
Showing
2 changed files
with
39 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<script> | ||
(function () { | ||
const script = document.createElement("script"); | ||
// Initialize the Web-SDK at the onLoad event of the script tag above so it will be called when the library is loaded. | ||
script.onload = () => { | ||
window.GrafanaFaroWebSdk.initializeFaro({ | ||
// Mandatory, the URL of the Grafana Cloud collector with embedded application key. | ||
url: 'https://faro-collector-prod-eu-west-2.grafana.net/collect/bd7c8e7f952b79cf8fcebea0f94ea33a', | ||
// Mandatory, the identification label(s) of your application | ||
app: { | ||
name: 'Mini Møder', | ||
version: "1.0.0" | ||
} | ||
}); | ||
}; | ||
// Set the source of the script tag to the CDN | ||
script.src = | ||
"https://unpkg.com/@@grafana/faro-web-sdk@@^1.4.0/dist/bundle/faro-web-sdk.iife.js"; | ||
// Append the script tag to the head of the HTML page | ||
document.head.appendChild(script); | ||
})(); | ||
</script> |