Can I include a subscriber variable in a link?
Yes, you can include a subscriber variable in every link in your newsletter.
Including a subscriber variable in a link is only useful if you have a specific purpose in mind. For example, if you want your subscriber to automatically log in to your website via the link. Or if you want your newsletter subscriber to be recognised immediately when they visit your website.
Adding a subscriber variable to a link is easy. You must first ensure that you include the subscriber variable in a separate field in your list. Then, when adding a link to your newsletter in step 4, you can include the subscriber variable.
Example
Suppose you want your subscribers to go directly to their own customer console on your website. Each customer has a separate code to be able to do this. You then create the field 'code' as an extra field. For example, the field value for customer Peter Petersen is: ac9hj8er12. The link to your website can then be:
http://mysite.com/webshop/promotions/?code={{code}}
Laposta then uses this link when sending the newsletter to Peter Petersen:
http://mysite.com/webshop/promotions/?code=ac9hj8er12
Explanation
For each link, including this specific link, Laposta registers whether it was clicked and how often. If Peter Petersen clicks his link twice, you will see that in the link statistics.
You can include any subscriber variable in your link. It may be 'code', but you can also use the first or last name or the email address of your subscriber. .
When entering field values in your list, it is important not to enter the entire URL. So not:
http://mysite.com/webshop/promotions/?code=ac9hj8er12
But only: ac9hj8er12. If you do enter the whole URL as a field value, the link will work, but Laposta will not be able to log statistics of this specific link. Moreover, you will not be able use the field values in other URLs.
Finally, an important (technical) remark. When inserting the value of the variable in the URL, Laposta does not encode the URL but copies it exactly the way it appears in the list. This is necessary because the variable can, for example, also be part of the path and URL encoding is therefore not desirable. If you want to use the variable in the query string (as in the example above) and it contains characters which should be encoded (characters other than letters, numbers and '-' / '.' / '_' / '~') then it is good practice to include it in the list after it is URL encoded.