Please make sure that you have a vaild Uplay account. If you don't then please register new account at Uplay.
After that please follow these steps:
1) Start Anno 1404: Venice.
2) Click on Player Profile.
3) Click on Create Online Profile
4) In Username field type your UPlay username. In Password field type your UPlay password (do not insert the email address of your Uplay account).
5) Press Ok.
6) Name your in-game profile.
7) Click on the arrow pointing to the left in order to go back to main menu.
8) Click on Multiplayer - Internet.
9) Type in your serial key (if you don't have serial key copied, then go to your GOG account and once in there find Anno 1404, click on it, select More -> Serial Keys and copy serial key, by pressing CTRL+C on your keyboard)
10) Go back to the game, and paste serial key in serial key field by pressing CTRL+V
11) Press Ok.
Important notice: Your serial key can't be activated with the button Unlock Code.