Algolia show searched string parameters and facet filters after render results

I am using Algolia with WordPress. Its working fine till now. Actually I want to get the search string and facet filters what I have selected after the search results has been rendered in the instant search.
So if I search for oxford and select united states and spain from the country facet filter then after search results rendered I should get the search query “oxford” and in country I should get “united states, spain”.

To achieve this I am doing something like this

var search = instantsearch({
  appId: algolia.application_id,
  apiKey: algolia.search_api_key,
  indexName: algolia.indices.searchable_posts.name,
  urlSync: {
    mapping: {'q': 's'},
    trackedParameters: ['query']
  },
  searchParameters: {
    facetingAfterDistinct: true,
highlightPreTag: '__ais-highlight__',
highlightPostTag: '__/ais-highlight__'
  }
});
search.on('render', () => {
	console.log(search.searchParameters.query); 
});

It only showing only the initial search string. But when I am trying to update the search it is not showing the updated one.
It is also not returning any facet filters searched attributes.
So can someone tell me how to get those values after search has been rendered?

Hello,

I got the solution by checking some documents. So I am posting the answer here so that someone can get benefit from here.

search.helper.on('result', function(event) {
 //To get search query
console.log(event._state.query);

//To get all the selected facets
console.log(event._state.disjunctiveFacetsRefinements);
});