All Collections
MoEngage
MoEngage - Deploying an Email Experiment
MoEngage - Deploying an Email Experiment
Updated over a week ago

Once you've set up your Content API, you're ready to use it to deploy Phrasee generated content to your audience.

First, target your email audience as normal, our action comes into play in step 2 - Content part of the email creation process.

Subject Line

To get the content in the subject line you just need to make some small adjustments to this code snippet:

{%set variants = ContentApi.phraseeRealtimeAPI({({"params":{"campaign_id":"PLACE CAMPAIGN_ID HERE","recipient_id":"{{UserAttribute['ID']}}","delivery_id":"{{CampaignAttribute['_id']}}"},"static_params":{},"dynamic_params":{},"request_body":{}})})%}{{variants.variant_text|default("PASTE FALLBACK SUBJECT HERE")}}

Replace PASTE CAMPAIGN_ID HERE with the campaign_id from the Phrasee platform. If you're not sure where, check this out. And replace the PASTE FALLBACK SUBJECT HERE text with your human control language variant you entered in Phrasee. Once you're done it'll look something like this:

{%set variants = ContentApi.phraseeRealtimeAPI({({"params":{"campaign_id":"PhAK33xPer1m3nT1d4d0cUM3NtAt1oN","recipient_id":"{{UserAttribute['ID']}}","delivery_id":"{{CampaignAttribute['_id']}}"},"static_params":{},"dynamic_params":{},"request_body":{}})})%}{{variants.variant_text|default("HELP! I am stuck in Phrasee Towers writing Documentation!")}}

This code snippet, aside from the parameterized campaign_id and default content, doesn't change between usage, so it can be saved into a code library for easy reuse.

You can now paste this code snippet into the subject line, like so:

That's the content part done, now you just need to add the open pixel in order to send engagement data back to Phrasee in real time.

Open Pixel

You need to add a small code snippet into the email html, just above the closing </body> tag.

Whether you are coding in the editor, or the code view, the code snippet required is:

{%set variants = ContentApi.phraseeRealtimeAPI({({"params":{"campaign_id":"PLACE CAMPAIGN_ID HERE","recipient_id":"{{UserAttribute['ID']}}","delivery_id":"{{CampaignAttribute['_id']}}"},"static_params":{},"dynamic_params":{},"request_body":{}})})%}<img src="{{variants.statistics_url}}" width="1px" height="1px">

Replace PASTE CAMPAIGN_ID HERE with the campaign_id from before, and once you're done it'll look something like this:

{%set variants = ContentApi.phraseeRealtimeAPI({({"params":{"campaign_id":"PhAK33xPer1m3nT1d4d0cUM3NtAt1oN","recipient_id":"{{UserAttribute['ID']}}","delivery_id":"{{CampaignAttribute['_id']}}"},"static_params":{},"dynamic_params":{},"request_body":{}})})%}<img src="{{variants.statistics_url}}" width="1px" height="1px">

As with the subject line, this code snippet, aside from the parameterized campaign_id, doesn't change between usage, so it can be saved into a code library for easy reuse.

Throttling

Finally, if you're using Phrasee's Dynamic Optimization for Broadcast product, then you'll need to apply a throttle to your send, in order to gather enough data to optimize effectively, and create enough time to make use of it.

Whilst scheduling the delivery, within Delivery Controls, there is a Request Limit option.

This is where you want to calculate the rate at which your message should be sent. This rate allows Phrasee the time it needs to optimize the subject line.

Phrasee would like as much time as possible to get the best results for your experiment. So the longer you allow, the better your results! Although, bear in mind that the maximum limit supported is 60,000 requests per minute.
โ€‹
Calculate the send rate by picking the number of hours over which you want to deploy your experiment and using that to divide your audience.

For this example, we are going to use 6 hours and an audience of 1,000,000. First, divide your audience of 1,000,000 by 6. Then, divide again by 60 to get your per minute send rate, as in the below:

1,000,000 / 6 = 166,667

166,667 / 60 = 2,778

Set a Request limit = 2,778 requests per minute

When you do this calculation for your audience, simply use your audience size and number of hours.

Now, schedule your campaign as you normally would. Make sure you take your send time length into consideration when you decide when your campaign should start.

With that set, you can publish the campaign and let MoEngage and Phrasee get to work.

Did this answer your question?