It seems like the issue might be with the contact identifier not being correctly passed or decoded when viewing the online version of the email. Here are a few possibilities to investigate:
1. Session Persistence or Cookie Issue: When users click on the link to view the email online, the system might be relying on a session or cookie to identify the contact and replace the $firstname$ token. If there’s an issue with session persistence across your Content Delivery (CD) and Content Management (CM) servers, some contacts might not be identified correctly, causing the token not to be replaced.
2. Cryptographic Key: Even though you mentioned that both the CM and Dedicated Email Delivery (DED) servers have the same EXM.CryptographicKey and EXM.AuthenticationKey values, ensure that the encoding and decoding process for contact identification works consistently across the servers. It’s possible that the decryption process on the CD server (which serves the online version) might not be working correctly for some users.
3. EXM Configuration: Verify that the EXM settings for both CM and CD servers are correctly configured. Ensure the EXM.RedirectUrlPage handler and related configurations are set up properly on the CD server, as this handles the redirection and decoding of parameters.
4. Personalization Data Availability: For users seeing "$firstname$", it’s possible that their contact record doesn’t have the $firstname$ token properly populated, or the personalized data may not be available at the time the email is rendered online.
5. Logging and Debugging: Enable verbose logging for EXM to capture any errors or warnings when the link is clicked. Look for logs around RedirectUrlPage.aspx to check if the contact’s details are correctly retrieved and tokens are replaced.
You can start by checking these potential issues, especially around session handling and how the CD server processes the online version of the email.
<redirectUrl>
pipeline, you can debug the query string that was decrypted and see the contact identifier. This might help you get a lead on the issue.