Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

add base Telemetry JavaScript snippet (fixes issue #172) #174

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Assets/WebGLTemplates/WebVR/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@
<meta name="description" content="%UNITY_CUSTOM_DESCRIPTION%">
<link rel="icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="webvr.css">
<script>
// Telemetry for collecting basic usage statistics, performance metrics, and catching errors.
(function () {
if (!navigator.onLine) {
return;
}
var ref = document.querySelector('script');
var script = document.createElement('script');
script.src = 'https://webxr.services/telemetry.js';
script.crossorigin = 'anonymous';
script.async = true;
(ref ? ref.parentNode : document.head).insertBefore(script, ref);
})();
</script>
<script src="%UNITY_WEBGL_LOADER_URL%"></script>
<script>
/* global UnityLoader */
Expand Down
14 changes: 14 additions & 0 deletions Build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@
<meta name="description" content="">
<link rel="icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="webvr.css">
<script>
// Telemetry for collecting basic usage statistics, performance metrics, and catching errors.
(function () {
if (!navigator.onLine) {
return;
}
var ref = document.querySelector('script');
var script = document.createElement('script');
script.src = 'https://webxr.services/telemetry.js';
script.crossorigin = 'anonymous';
script.async = true;
(ref ? ref.parentNode : document.head).insertBefore(script, ref);
})();
</script>
<script src="Build/UnityLoader.js"></script>
<script>
/* global UnityLoader */
Expand Down