I am trying to create an email template that embeds personalisation tags/custom fields into a hyperlink. The page that is linked to scrapes this data from the URL using $_GET.
For example, I would be able to scrape a person's name and company name via the following link:
The land.php page would be coded to assign the following variables:
$name = $_GET['name']; $company = $_GET['company'];
The problem is that ampersands and the like will break this little trick. Is there a switch I can use to urlencode tags/fields? Or some other way to achieve this? If not, could this be considered for a future update to Campaign Monitor? Something like [firstname,urlencode=true]?
Thanks in advance for any advice or help.
Can anybody at CM help?
this isn't possible at the moment, I'm afraid, but we've added your vote.
For now, one workaround would be to add custom fields with the url encoded values, or even just one custom field with the whole query string.
OK, thanks for the suggestion. I will have to try that in future before importing data. I know I can concatenate cells and text together in Excel, and form a query string in this way, but not sure if Excel can urlencode stuff! But would really love to see this in future enhancements.
Count my vote too.
A nice idea would be also to use different chars than '<' and '>' as tag delimiter (maybe square braces as in the text-version?). That would allow to construct URLs using month and year numbers.