I need to simplify url strings for some reporting, and sometimes our url strings have gclid params baked into them at different parts:
https://www.website.com/colors/blue?src=camp_id1&gclid=Cj0KCQjwoInnBRDDARIsANBVyASfVUCg4ShKaAq4q8cX6xgB4kYj-oRGEPuO5UuUaAnZi2zD7yQU684aAo3KEALw_wcB
or
https://www.website.com/colors/blue?gclid=Cj0KCQjwoInnBRDDARIsANBVyASfVUCg4ShKaAq4q8cX6xgB4kYj-oRGEPuO5UuUaAnZi2zD7yQU684aAo3KEALw_wcB&src=camp_id1
or
https://www.website.com/colors/blue?page=2&gclid=Cj0KCQjwoInnBRDDARIsANBVyASfVUCg4ShKaAq4q8cX6xgB4kYj-oRGEPuO5UuUaAnZi2zD7yQU684aAo3KEALw_wcB&src=camp_id1
or
https://www.website.com/colors/blue?page=2&src=camp_id1
So there are all these variations of the URL. Sometimes they contain the gclid and sometimes they don't. They're often at different parts in the url.
What's the easiest way in ruby to print the string without the gclid substring if it's there?