Deploying a Push Notification Experiment in a Journey

Prev Next

Overview

This article shows how to run a Jacquard Dynamic Optimisation experiment on an AJO push notification. Each Jacquard variant holds both the push Title and the push Body in a single string, separated by Jacquard's split character 〽.

For example, the Custom Action may return:

Your weekend treat is waiting 〽Take 20% off everything until Sunday. Tap to shop.

In the push message, AJO personalisation expressions cut that string at 〽. Everything before it goes into the Title. Everything after it goes into the Body.

This article follows on from Getting Started and mirrors Deploying an Experiment in a Journey, which covers email.

Before you start

  • The Jacquard Custom Action (for example jacquardRealtimeAPI) is set up as described in Getting Started, with every response field set to string.

  • A push channel configuration exists in AJO for your iOS and/or Android app, and your app is set up to receive AJO push.

  • You have the experiment's Campaign ID from the Jacquard UI.

  • You have human-written control copy for the title and body, to use as a fallback.

The Custom Action response contains these fields. Only variant_text is used in the push content.

Field

Used for

variant_text

Title and Body, split at 〽

variant_id, campaign_id, project_id, batch_id, send_id

Not needed in the push content

statistics_url

Email open pixel only. Push has no HTML, so it is not used (see Tracking below)

Step 1: Add the Custom Action to the journey

The Custom Action must sit before the Push action, so its response is available when the push is personalised.

  1. Open your journey. Audience profiles are read in throttled to up to 1,000 records per second.

  2. From the Actions section of the left menu, drag the jacquardRealtimeAPI Custom Action onto the canvas, after the entry event or audience read.

  3. Set the access configuration to none.

  4. Map the three query parameters:

Parameter

Value

campaign_id

The experiment's Campaign ID from the Jacquard UI (constant)

recipient_id

Journey Properties > Identity > profileId

delivery_id

A value from Journey Properties (for example the journey version ID), as in the email setup

recipient_id must be the profileId. Otherwise engagement data cannot be matched back to Jacquard.

Step 2: Add the Push action

  1. From the Actions section, drag a Push action onto the canvas, directly after the Custom Action.

  2. Select the push channel configuration for your app.

  3. Click Edit content. The editor shows Title and Body fields with an iOS / Android preview.

  4. Set the on-click behaviour (Open app, Deeplink or Web URL), media and buttons as you would for any push. These are not affected by the experiment.

Android only: if you choose the Expanded layout, a Collapsed body field also appears. Put the same Body expression from Step 3 in it, or the collapsed notification shows no body text.

Step 3: Split the variant into Title and Body

The Title takes the text before 〽 and the Body takes the text after it. Both expressions fall back to your control copy if the response is empty or has no split character.

Find the variant_text path

  1. Click the Title field, then open the personalisation editor.

  2. Go to Contextual attributes > Journey Orchestration > Journey Properties > Actions > jacquardRealtimeAPI and click + next to variant_text.

  3. Note the inserted path. It looks like context.journey.actions.<ACTION_ID>.variant_text. If you copy it elsewhere, remove the backticks around the action ID.

  4. Delete the inserted token and paste the Title expression below, using that path.

Title field

{% let vt = context.journey.actions.<ACTION_ID>.variant_text %}
{%#if isNotEmpty(vt) %}{% let splitAt = indexOf(vt, "〽") %}{%#if splitAt > 0 %}{% let jqTitle = trim(substr(vt, 0, splitAt)) %}{{{jqTitle}}}{%else%}YOUR CONTROL TITLE{%/if%}{%else%}YOUR CONTROL TITLE{%/if%}

Body field

{% let vt = context.journey.actions.<ACTION_ID>.variant_text %}
{%#if isNotEmpty(vt) %}{% let splitAt = indexOf(vt, "〽") %}{%#if splitAt > 0 %}{% let jqBody = trim(substr(vt, splitAt + 1, length(vt))) %}{{{jqBody}}}{%else%}YOUR CONTROL BODY{%/if%}{%else%}YOUR CONTROL BODY{%/if%}

Replace <ACTION_ID> with your action's ID, and YOUR CONTROL TITLE / YOUR CONTROL BODY with your human control copy. Click Validate, then Save.

How it works

  • indexOf finds the position of 〽 (0-based; -1 if absent).

  • substr(vt, 0, splitAt) returns the text before it; substr(vt, splitAt + 1, length(vt)) returns the text after it. AJO's substr takes a begin and end index.

  • trim removes any space either side of the split character.

  • The triple braces stop AJO from HTML-encoding characters such as & and ', as in the email subject line.

Replacer variables

If variants contain a merge tag such as NAME_MERGE_TAG, wrap the split result in replace before output, as in the email article:

{% let jqTitleFinal = replace(jqTitle, "NAME_MERGE_TAG", profile.person.name.firstName) %}{{{jqTitleFinal}}}

Save as Fragments

The action ID stays the same across journeys, so save the Title and Body expressions as two expression Fragments and reuse them. Update the Fragments if you duplicate the Custom Action, because the copy gets a new ID.

Step 4: Fallback, tracking, test and publish

If the API call fails

On the Custom Action, tick Add an alternative path in case of a timeout or an error. Add a second Push action on that path with your control title and body typed in as static text. Profiles still get a message if Jacquard does not respond.

Tracking

  • Push has no HTML, so there is no open pixel and statistics_url is not used.

  • Push engagement reaches Jacquard through the Adobe Destination set up in Event Tracking. Ask your Customer Success contact to confirm the push tracking dataset is included in the export.

  • Exports run at best every 3 hours, which limits in-flight optimisation for push. Results still feed reporting and language-model training.

Test

  1. In the Push editor, use Simulate content with a test profile to check the Title and Body render as two separate strings with no 〽 showing.

  2. Run the journey in Test mode, or send to a test device, and check the notification on both iOS and Android.

  3. Test the fallback: point campaign_id at an invalid value in a test version and confirm the control copy appears.

Publish

Configure the rest of the journey as usual, then click Publish. The Custom Action cannot be edited once it is used in a live journey; duplicate it to make changes.

Troubleshooting

Symptom

Likely cause

Fix

Control copy always shows

Variants have no 〽, or the action path is wrong

Check the experiment copy in Jacquard; re-insert variant_text from Contextual attributes

〽 appears in the notification

Expression was pasted into only one field

Use the Title expression in Title and the Body expression in Body

&amp; or &#39; in the text

Output used double braces

Output the variable with triple braces {{{ }}}

Validation error on the path

Backticks around the action ID were removed or added incorrectly

Re-insert the attribute from the editor rather than typing it

Body empty on collapsed Android notification

Expanded layout with empty Collapsed body

Paste the Body expression into Collapsed body too

Throttling errors with many journeys

Adobe caps calls to one host at 5,000 per second

Throttle below 1,000 per second when Jacquard runs in more than five live journeys