Remove Everything After a ? in a URL Macro No Tracking or Long URLs

This macro removes all the extra tracking text in a web URL from an email link, google tracking link, promotions etc. It makes sharing URL's in emails cleaner. Not the best for their stats and may mess up some results for maps etc.

Remove Everything After a ? in a URL Macro (v10.2)

14)Remove Everything After a ? in a URL.kmmacros (38 KB)

4 Likes

Good idea. You could also use the Front Browser URL Token to retrieve the URL and then interact with it directly.

1 Like

Remove Everything After a ? in a URL alt Macro (v10.2)

14)Remove Everything After a ? in a URL 1.kmmacros (32 KB)

Thanks @cdthomer here is an alternate that just puts the new URL in the system clipboard and only works in Safari.

3 Likes

Assuming that's your "I have no idea..." comment above the "Search" action...

"All" is the entire match to your search pattern, which in this case includes ? at the end of your search string. "1" is the first capture group in your pattern -- everything between the first ( and ) -- in this case, everything matched except the trailing ?

An Automatic URL Decrufter for Defined Hosts

Thanks @Nige_S for the explanation that is helpful.

Thanks, Chris, I looked for that but didn't know what to search for apparently. So wonderful to have people like you here!