Please try below code:
var ctx;
SP.SOD.executeFunc('SP'sp.js', 'SP.ClientContext', sharePointReady);
function sharePointReady () {
ctx = new SP.ClientContext.get_current();
var siteColl = ctx.get_site();
var rootWeb = siteColl.get_rootWeb();
this.props = rootWeb.get_allProperties();
ctx.load(rootWeb);
ctx.load(this.props); //need to load the properties explicitly
ctx.executeQueryAsync(Function.createDelegate(this, gotProperty), Function.createDelegate(this, failedGettingProperty));
});
function gotProperty() {
var policy = this.props.get_item('GA_PolicyDisplayName');
var primarySiteContact = this.props.get_item('GA_PrimarySiteCollectionContact');
var secondarySiteContact = this.props.get_item('GA_SecondarySiteCollectionContact');
elem = document.getElementById('ga-sitecontact');//Pass your desired object
elem.innerHTML = "<b>Policy:</b> " + policy + " <b>Primary Contact:</b> " + primarySiteContact + " <b>Secondary Contact:</b> " + secondarySiteContact;
}
function failedGettingProperty() {
// swallow
}
Reference:
Hope this will help you.