All Collections
Braze
Braze - Dynamic optimization - Setting up a push message
Braze - Dynamic optimization - Setting up a push message

Just a little Push

Updated over a week ago

At this point, you have set up your reusable content blocks (if not, check this out) and Started the awesome in the Phrasee app for the experiment you are about to send.

Now, we shift to your message setup.

Here, you'll need to paste the following code snippet into the Message field of your Braze push message and replace the PASTE YOUR HUMAN CONTROL HERE text with your human control language variant you entered in Phrasee:

{% assign phraseeExperimentId = '<campaign_id>' %}{{content_blocks.${phraseeContent}}}{% comment %}{% endcomment %}{{variants.variant_text | default: "PASTE YOUR HUMAN CONTROL HERE" }}

You'll need a critical piece of data for this snippets:

  • Phrasee Experiment ID - you'll paste this over <campaign_id> in the code snippets

If you're not sure where to find your experiment ID, we've got an article for that, too!

Below is an example of what the code snippet for the Message field might look like with an experiment ID populated:

If you are generating a Title and Message, you will need slightly different code snippets in each section.

For Title:

{% assign phraseeExperimentId = '<campaign_id>' %}{{content_blocks.${phraseeContent}}}{% comment %}{% endcomment %}{{variants.variant_text | default: "PASTE YOUR HUMAN CONTROL HERE" | split: '〽' | first }}

For Message:

{% assign phraseeExperimentId = '<campaign_id>' %}{{content_blocks.${phraseeContent}}}{% comment %}{% endcomment %}{{variants.variant_text | default: "PASTE YOUR HUMAN CONTROL HERE" | split: '〽' | last }}

Personalization

If your Phrasee language contains personalization tags, you'll need to add them to your subject line code snippet in between the {% comment %} and {% endcomment %} tag.

If you don't include the personalization tags within the comment tags, Braze will not process them properly and (horrors!) they will be rendered as literal text within your subject line.

Our example below shows how a code snippet might be configured with Braze's default first name personalization field:

{% assign phraseeExperimentId = '<campaign_id>' %}{{content_blocks.${phraseeContent}}}{% comment %} {{${first_name}}} {% endcomment %}{{variants.variant_text | default: "PASTE YOUR HUMAN CONTROL HERE"}}

Note the placement of the {{${first_name}}} tag between the comment tags.

If you require multiple personalization tags, you can simply add them between the {% comment %} and {% endcomment %} tag with a space between them. A bit like this:

{% comment %} {{${first_name}}} {{${last_name}}}{% endcomment %}

Give it a test

Once you've added your code snippets properly to Braze and activated your experiment in Phrasee, you should be able to preview the push and see your message populating dynamically.

After you've set all of this up for the first time, it's a good idea to save your code snippets somewhere safe so you can simply reuse them in the future by swapping out the experiment ID.

Preparing for deployment

Once you've verified your code snippets and personalization tags are functioning properly, you've completed your minimum push setup. You can now deploy your pushes via your preferred trigger method if you're deploying triggered message experiments.

If you're sending broadcast message experiments, please proceed to the broadcast message experiment rate limiting article to learn about an additional setting you'll need to use.

When deploying to a preconfigured Segment for both triggered and broadcast messages with dynamic optimization, ensure your segment has Analytics Tracking turned ON as in the example below:

Just like that, you're as Brazed as short ribs on grandma's dinner table.

Did this answer your question?