How to append to all urls in a string?
- by Echo
How should I go about appending to the end of all urls in string of html that is about to be sent out as as email? I want to add the google analytics campaign tracking to it like this:
?utm_source=email&utm_medium=email&utm_campaign=product_notify
99% of the pages will not end in '.html' and some urls might already have things like ?sr=1 at the end of them.