The formula for keyword insertion typically involves using a placeholder in your ad text, formatted as {KeyWord:default text}. This tells the ad platform to replace the placeholder with the user's search term, or with the default text if the search term is too long or doesn't fit.