How to add query parameter before #stq= fragment

Hi All, Another option which would not require coding is to read the fragment in Google Tag Manager and then either append it to the pageview URL and/or create a custom event to track the search query.