made client analytics ID a string'
This commit is contained in:
parent
88a8a738d0
commit
44f9df1766
2 changed files with 4 additions and 4 deletions
|
@ -47,19 +47,19 @@ module.exports = {
|
|||
publish: function(name, filepath, license, nsfw, socket) {
|
||||
// update the client
|
||||
socket.emit("publish-status", "Your image is being published (this might take a second)...");
|
||||
visitor.event("Publish Route", "Publish Request", name, {filepath, license, nsfw}).send();
|
||||
visitor.event("Publish Route", "Publish Request", name, filepath).send();
|
||||
// create the publish object
|
||||
var publishParams = createPublishParams(name, filepath, license, nsfw);
|
||||
// get a promise to publish
|
||||
lbryApi.publishClaim(publishParams)
|
||||
.then(function(data){
|
||||
visitor.event("Publish", "Publish Success", name, {filepath, license, nsfw}).send();
|
||||
visitor.event("Publish", "Publish Success", name, filepath).send();
|
||||
console.log("publish promise success. Tx info:", data)
|
||||
socket.emit("publish-complete", {name: name, result: data.result});
|
||||
deleteTemporaryFile(filepath);
|
||||
})
|
||||
.catch(function(error){
|
||||
visitor.event("Publish Route", "Publish Failure", name, {filepath, license, nsfw}).send();
|
||||
visitor.event("Publish Route", "Publish Failure", name, filepath).send();
|
||||
console.log("error:", error);
|
||||
socket.emit("publish-failure", handlePublishError(error));
|
||||
deleteTemporaryFile(filepath);
|
||||
|
|
|
@ -41,7 +41,7 @@ var hbs = expressHandlebars.create({
|
|||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', ${googleApiKey}, 'auto');
|
||||
ga('create', '${googleApiKey}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue