Added comment to indicate API key
This commit is contained in:
parent
4a31ed229b
commit
920a54c810
1 changed files with 28 additions and 33 deletions
|
@ -55,20 +55,16 @@ document.addEventListener("click", event => {
|
||||||
let hrefParts = window.location.href.split("#");
|
let hrefParts = window.location.href.split("#");
|
||||||
let element = target.title || target.text.trim();
|
let element = target.title || target.text.trim();
|
||||||
if (element) {
|
if (element) {
|
||||||
amplitude
|
amplitude.getInstance().logEvent("CLICK", {
|
||||||
.getInstance()
|
target: element,
|
||||||
.logEvent("CLICK", {
|
location:
|
||||||
target: element,
|
hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/",
|
||||||
location:
|
});
|
||||||
hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/",
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
amplitude
|
amplitude.getInstance().logEvent("UNMARKED_CLICK", {
|
||||||
.getInstance()
|
location:
|
||||||
.logEvent("UNMARKED_CLICK", {
|
hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/",
|
||||||
location:
|
});
|
||||||
hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/",
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
@ -90,27 +86,26 @@ var init = function() {
|
||||||
|
|
||||||
function onDaemonReady() {
|
function onDaemonReady() {
|
||||||
lbry.status().then(info => {
|
lbry.status().then(info => {
|
||||||
amplitude
|
amplitude.getInstance().init(
|
||||||
.getInstance()
|
// Amplitude API Key
|
||||||
.init(
|
"0b130efdcbdbf86ec2f7f9eff354033e",
|
||||||
"0b130efdcbdbf86ec2f7f9eff354033e",
|
info.lbry_id,
|
||||||
info.lbry_id,
|
null,
|
||||||
null,
|
function() {
|
||||||
function() {
|
window.sessionStorage.setItem("loaded", "y"); //once we've made it here once per session, we don't need to show splash again
|
||||||
window.sessionStorage.setItem("loaded", "y"); //once we've made it here once per session, we don't need to show splash again
|
app.store.dispatch(doDaemonReady());
|
||||||
app.store.dispatch(doDaemonReady());
|
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<div>
|
<div>
|
||||||
<App />
|
<App />
|
||||||
<SnackBar />
|
<SnackBar />
|
||||||
</div>
|
</div>
|
||||||
</Provider>,
|
</Provider>,
|
||||||
canvas
|
canvas
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue