Dynamic content inserts

WARNING: If an insert in a Dynamic Content communication is malformed, the communication fails and is not downloaded by the SDK at all.

Common tags available in dynamic content

You can use all tags from Insert usage.

Accessing meta properties

To access an OG tag when creating dynamic content, use the following syntax:

{{ metric_additional_params["property_name"] }}

Important: This only works with HTML meta tags that have the property and content attributes.

This allows you modify and personalize the page depending on metadata. For example, you can manipulate search results or manipulate which catalogs are accessed.

Example

// Get the unique ID from og:tags:
{% set key = metric_additional_params['product:retailer_part_no'] %}
// Use the ID to retrieve the value of the 'title' column:
{% catalog.catalogName(key).title %}

You can use this mechanism to retrieve data such as the name, price, or brand of an item from a catalog. Thanks to this, the catalog can become a single source of data for multiple websites that present the same item.

In this example, the insert is used in a dynamic content communication created for the article you are reading now.

The communication:

  1. Checks the unique ID of the item (this article) in the page’s OG tags.
  2. Retrieves the title of the item from a catalog in Synerise.
  3. Replaces the content of the code tag below with the title of the article. Check the HTML source of the code tag to see the content that was replaced.

The content of the following code tag is replaced:
Replace this text

Configuration of the example
Content configuration of the example

Validation

Whenever you use Jinjava in dynamic content, verify that it displays correctly for a few different customers to make sure that the logic you applied covers all scenarios. If Jinjava fails to render, the communication is not sent to a customer at all.

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.