Best Practices Guide

This section provides some practices that will help you use RPL. This will help your code function more smoothly and will improve the performance of your programs.

Slow Personalization From the Usage of Dynamic Variables in Clickthrough

In your campaign, you may find clickthrough is taking a long time to personalize. One common reason for this is the usage of dynamic variables in clickthrough. Note the usage of 'MCID_VALUE' in the following example:

 ${clickthrough('EXAMPLE','EMAIL_SHA256_HASH_','MCID_VALUE')}

In this example, MCID_VALUE is a dynamic variable that had an RPL fragment specified as the default value. So, MCID_VALUE is being computed every time a clickthrough fragment like above is encountered. For every clickthrough, that RPL fragment gets executed repeatedly. Each execution needs some free marker initialization that takes extra time.

Solution

Instead of using the dynamic variable directly, you can do the following:

  • Do not use RPL fragments as the default value for the dynamic variables that are used in clickthrough. Instead, declare that variable in the beginning of the main document, and initialize as it was done by the RPL fragment in the default value. You can do so with the following code:
  • <#assign MCID_VALUE=".....">
  • In clickthrough, use the following style to get the value of a variable instead of using 'MCID_VALUE', like this:
  • 'MCID_VALUE=' + MCID_VALUE

    So, the first example would look like:

     ${clickthrough('EXAMPLE','EMAIL_SHA256_HASH_','MCID_VALUE=' + MCID_VALUE)}

Next steps

Handling missing values

Learn more

Method Reference