Query String parsing and string substitution on page

Commenting here in case people haven’t found an answer yet.
Use case: to take a keyword you’ve passed from Google Ads, Facebook Ads or an email and insert it into a body of text on your website.
Here’s how to do Dynamic Keyword Insertion in Wix:

//Start
$w.onReady(function () {
//Saves the query 'keyword'
const keyword = wixLocation.query["keyword"];
    if (keyword) {
//Target text object 'headline'. += will add to the existing text, = will replace everything.
//e.g. if wix was the keyword you would get 'Test wix test2' (note the spaces)
    $w("#headline").text += "Test " + keyword + " test2";
  }
});


Hope this helps people!