Skip to content
This repository was archived by the owner on Nov 24, 2020. It is now read-only.

Commit 210ca92

Browse files
fix: Load analytics as an html tag
Load analytics as an html tag
2 parents a56d9b4 + 13e89f5 commit 210ca92

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
</head>
1212
<body>
1313
<div id="root"></div>
14+
<script type="text/javascript" src="https://cdn.rawgit.com/watson-developer-cloud/watson-developer-cloud.github.io/master/analytics.js"></script>
1415
</body>
1516
</html>

src/index.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,4 @@ import 'watson-react-components/dist/css/watson-react-components.css';
55
import Layout from './layout';
66
import './style.css';
77

8-
function loadAnalytics() {
9-
const analyticsScript = document.createElement('script');
10-
analyticsScript.src = 'https://cdn.rawgit.com/watson-developer-cloud/watson-developer-cloud.github.io/master/analytics.js';
11-
document.head.appendChild(analyticsScript);
12-
}
13-
window.addEventListener('load', loadAnalytics);
14-
158
ReactDOM.render(<Layout />, document.getElementById('root'));

0 commit comments

Comments
 (0)