Skip to content

Instantly share code, notes, and snippets.

@linkerzx
Created December 16, 2019 23:37
Show Gist options
  • Save linkerzx/19d0e381bfd8d93ba3bb93fae2ac21df to your computer and use it in GitHub Desktop.
Save linkerzx/19d0e381bfd8d93ba3bb93fae2ac21df to your computer and use it in GitHub Desktop.
function sendClickStream(event_str){
const uri = 'https://localhost'
const params = {
body: {
"contentData": btoa(event_str),
"Properties": {}
},
method: "POST"
}
fetch(uri , params)
.then(data=>{return data.json()})
.then(res=>{console.log(res)})
.catch(error=>console.log(error))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment