Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Calling Get Specific URLQueryItem from URLComponents
// https://hashaam.com/2017/09/02/get-specific-urlqueryitem-from-urlcomponents
if let utmTermValue = queryParam(urlString: "http://www.example.com/?utm_source=adsite&utm_campaign=adcampaign&utm_term=adkeyword", param: "utm_term") {
// handle utmTermValue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment