-
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.
- Loading branch information
1 parent
6392992
commit a73b943
Showing
1 changed file
with
5 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,64 +5,13 @@ Gleap.setApiUrl("http://0.0.0.0:9000"); | |
|
||
Gleap.setLanguage("de"); | ||
|
||
Gleap.initialize("__"); | ||
Gleap.open(); | ||
//Gleap.setEnvironment("dev"); | ||
Gleap.initialize("XNWIMPYahK8tJcJCp7RrqtoxZo1MMV7n"); | ||
|
||
/*Gleap.setUrlHandler((url, newTab) => { | ||
alert("URL: " + url + " newTab: " + newTab); | ||
});*/ | ||
|
||
Gleap.playSound(false); | ||
|
||
Gleap.on("initialized", (data) => { | ||
console.log("initialized", data); | ||
}); | ||
|
||
Gleap.attachCustomData({ | ||
mission: "Unicorn", | ||
type: "Demo App", | ||
nestedData: { | ||
possible: true, | ||
name: "Mission: Impossible - Ghost Protocol", | ||
}, | ||
}); | ||
|
||
Gleap.log("Test log"); | ||
Gleap.log("Test log info", "INFO"); | ||
Gleap.log("Test log warn", "WARNING"); | ||
Gleap.log("Test log err", "ERROR"); | ||
|
||
Gleap.trackEvent("Master Event"); | ||
|
||
Gleap.on("unregister-pushmessage-group", (data) => { | ||
console.log("unreg", data); | ||
}); | ||
|
||
Gleap.on("register-pushmessage-group", (data) => { | ||
console.log("reg", data); | ||
}); | ||
|
||
// Register custom action. | ||
Gleap.registerCustomAction((customAction) => { | ||
console.log("Custom action called:"); | ||
console.log(customAction); | ||
}); | ||
|
||
// Network logs test. | ||
setTimeout(() => { | ||
console.log("Loading place infos"); | ||
|
||
var xmlhttp = new XMLHttpRequest(); | ||
var url = "https://jsonplaceholder.typicode.com/todos/1"; | ||
xmlhttp.onreadystatechange = function () { | ||
if (this.readyState == 4 && this.status == 200) { | ||
var myArr = JSON.parse(this.responseText); | ||
console.log(myArr); | ||
} | ||
}; | ||
xmlhttp.open("GET", url, true); | ||
xmlhttp.setRequestHeader("asdfasdf1", "wertwertwert1"); | ||
xmlhttp.setRequestHeader("asdfasdf2", "wertwertwert2"); | ||
xmlhttp.send(); | ||
}, 5000); | ||
Gleap.identify("12345", { | ||
name: "John Doe", | ||
email: "[email protected]" | ||
}); |