How to use Merge Parameters
Merge Parameters allow data to be passed into a SmartBlock for Personalisation. Some examples include:
- Pass in Name to personalise banners with “Hello X”
- Pass in Product ID for similar products recommendation data sources, and ensure that the same product isn’t recommended
- Pass in product category or collection on PDP Recommendations to provide similar products or ‘Complete’ the look recommendations
- Pass in Site Brands, languages or currencies to restrict to the right product database for the customer (e.g. on US site = product prices displayed in USD
Merge Parameters work by inserting the relevant value e.g. product ID into the Slot, which passes on the value over to the SmartBlock to personalise, for example finding similar products to that product ID.
WHAT CAN YOU MERGE?
Depending on the placement of the content, Merge parameters can be automatically populated:
- Email: In your emails by using fields already defined in your ESP, or mapped from Fresh Relevance into your ESP
- Web: Placed on the web by the Site Editor allows use of variables recorded by the script on page load
- Web: Placed by your developpers allows any variable they can populate to be passed through
See the Available Merges section below for more information.
Available Merges
Email – Content served from ESP
For email content, you are able to pass any information available in your ESP to the template.
This could be variables like name, customer numbers, segment information (e.g. currency & language)
Check with your ESP what other dynamic fields you may have available.
You can also hard code values to these parameters in different emails (e.g. currency/language)
Web – Deployed using Site Editor
Any variable setup in your script can be accessed when placing the Slot via the Site Editor.
This will often include:
- prid = Product ID
- sbr = Site Brand
- curr = Currency
- lang = Language
- cv = Cart Value (which will likely include delivery fees)
Additional variables may be available through Tags (often used to capture categories, brands and SKU details e.g. color). To see what is available for you review a PDP via the Site Info Bar:
- Go to Content | Site Editor
- Under the iFrame loading your website, click the Preview button. This will open your website in a new tab with the Site Info Bar
- Navigate to a PDP and click the expand Icon on the Site Info Bar. This will expose the Tags.
Tags can either be stored directly as a Value, or within Tag Groups. Specific Tag Groups can be passed as a Merge Parameter, allowing you to limit to specific levels. e.g. color
Web – Deployed via Slot Code
Any variable available to your technical team can be added into the Slot HTML code. The sky is the limit!
How to use Merge Parameters
Step 1 – Add Parameters to your Smartblock
You can add your Merge Parameters to you SmartBlock on the Layout tab under Merge Parameters.
If you’re deploying your SmartBlock by the Site Editor, you will need to ensure that you use the correct codes.
Most commonly you will use:
- prid – Product ID
- sbr – Site Brand
- lang – Language
- curr – Currency
More information on available Merge Codes can be found here: https://admin.freshrelevance.com/help/content/mergecodes/
Step 2a – Use to Personalize Text
If personalizing text, preceed your merge parameter with merges. and wrap in double curly brackets {{ }}
For example, to say call upon the merge paramater name I would use {{ merges.name }}
You can also add fallback text to be presented when no value is available for that customer.
For example to say “Hi Sophie” if Sophie’s name is known, otherwise say “Hi customer” I would use Hi {{ merges.name or ‘customer’ }}
Step 2b – Use to Dynamically filter recommendations
You can merge in data to dynamically filter products recommendations.
For example, by filtering dynamically to currencies, languages and site brands in order to efficiently use the same block across all variations.
Additionally, merge in identified categories to create a category specific recommendation set, or exclude on page products from being recommended.
To use in filters, preceed your merge parameter with merges. and wrap in double curly brackets {{ }}
For example, to merge in sbr (Site Brand) use the code {{ merges.sbr }}
Quick Merges:
- Site brand {{ merges.sbr }}
- Currency {{ merges.curr }}
- Language {{ merges.lang }}
- Product ID {{ merges.prid }}
Step 3 – Add Parameters to your Slot
When you are happy with your SmartBlock, click Publish and use to create a Slot.
After selecting your location for deployment, you will enter a properties page, which will pre-fill your merge parameters to match your SmartBlock.
If you area creating a Slot ahead of content through the Slot | Create function, you will need to type in the Merge Parameters manually, matching the Parameters in the SmartBlock
Top Tip!
If adding Merge Parameters to existing SmartBlocks, check that these are also configured on the existing slot by going to Content | Slots then viewing the Edit tab in your chosen Slot.
Step 4a – Deploy to email
In your Slot, go to the Use tab to access the HTML code to copy into your emails.
This code requires populating with your ESP merge values, for email address (so that we know which individual to personalise to) and any Merge Parameters that you’ve added.
Under Edit ESP merge values you can enter the required value and automatically update your code. In the example image, the ESP merge for email is *|email|*. You can change this value to the appropriate code for your ESP and click Update.
Please refer to your ESP’s documentation for the relevant codes for your provider.
Step 4b – Deploy to web via site editor
In your Slot, simply go to the use tab and click Site Editor to open the drag and drop interface to deploy content.
Step 4c – Deploy to web via Slot Code
Most commonly this would be populated and deployed by your web development team.
In your Slot, go to the Use tab and decide whether you want to populate Merge Parameters from the server or page querystring.
Copy the relevant code and substitute in the values before adding the Slot HMTL to your website.