Skip to content

Instantly share code, notes, and snippets.

@dustinrecko
Created October 7, 2018 15:26
Show Gist options
  • Save dustinrecko/7b12995355928d52ab184522cdfc3454 to your computer and use it in GitHub Desktop.
Save dustinrecko/7b12995355928d52ab184522cdfc3454 to your computer and use it in GitHub Desktop.
<script>
(function(){
var xmlhttp = new XMLHttpRequest();
var db = "https://your-database.firebaseio.com/"+{{Client Id}}.replace(/\./g,"_")+".json";
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
window.gaIds = JSON.parse(this.responseText);
}
};
xmlhttp.open("GET", db, true);
xmlhttp.send();
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment