The deltaDNA platform can be used to send targeted push notification messages to players that will result in them getting rewarded, automatically navigated to a deeplink or presented with some other type of promotion in the game.

This tutorial will show you how to instrument your game to react to reward and deeplink navigation instructions, build campaigns to target players with push notifications containing reward and deeplinks, then build reports to measure the impact of your campaigns.

There are three phases to this type of campaign:

  1. Sending the player a push notification.
    We’ll build an Engage Out Of Game campaign to select a player segment and send them a push notification message that contains the ID of a promotion they have been targeted with.
  2. The player launching the game.
    We will build an Engage In Game campaign to retrieve the details of the reward or deeplink for the player, based on the ID of the promotion and potentially some further criteria
  3. The player receiving their reward
    The game will react to parameters sent back to it by the Engage In Game campaign triggered at launch.

The entire process looks like :


Before diving head long in to this type of campaign, you will need to define a common taxonomy that will be used to communicate the intent of your campaigns to the game. You will need to decide what in-game behaviours you want to trigger so the developers can instrument the game to react to commands sent to it by the marketer’s campaigns.

In this example we want the externally instruct the game to reward the player with coins, or navigate them to a specific location in the game. The parameters we will use to do this are:

promoType : Instructs the game on the type of promotion that is running, contain a value of COINS or DEEPLINK
: Tells the game how many coins to reward the player.
deeplinkDestination : Tells the game where it should navigate the player to.

In addition to these parameters we will also define the following two parameters:

promoID : Used coordinate and track your promotions
promoChannel : Contains a value of PUSHEMAIL or WEB, also used for coordination and tracking.

These parameters need to be created in the SETUP > Game Parameters tool on your game. You may want to name them differently and extend them depending on the particular features of your game.

An Engage decision point will also be needed, as we will check for any active deeplinking campaigns for the player every time they launch the game from a push notification message. Use the SETUP > Decision Point tool to add a deeplink decision point, and add the promoID and promoChannel as decision point parameters so the campaign can check against them for active deeplinking campaigns.

Finally, the deltaDNA platform and SDK will be recording some events automatically to provide visibility for reporting and campaign management, more on these later. We will create an additional custom event that should be recorded by the game each time the player successfully receives a reward from one of these campaigns.

The SETUP > Manage Events tool is used to create a promoReceived event containing the promoID, promoChannel, promoTypecoinRewardAmountdeeplinkDestination. We will also replicate some of the engageResponse event parameters in to this event to make reporting easier. We end up with an event that looks like:


The game parameters, decision point and custom event creation steps above should all be undertaken on your DEV environment, where they can be tested, before being published to your LIVE environment for use in full production campaigns.

Once this basic preparation is complete you have a common taxonomy that Development and Marketing can both work with. Before setting up the campaigns and reporting, we will look at the client side instrumentation required to support this.

Client Instrumentation.

This tutorial has been created in Unity v2017.1.0f3 to send notifications to iOS. It is assumed that you have already added the deltaDNA SDK to your game and implemented basic push notifications.

Add some code to the notification callback so we can check for a promotions.

Add something to parse out the promoID and promoChannel from the notifcation payload

Then use the promoID and promoChannel to check for campaigns containing rewards or deeplinks then deliver them to the player and send an event back to deltaDNA confirming the player received their promotion.

That’s all the plumbing out of the way we can start building some push notification gifting campaigns.

The complete Unity project including this code can be downloaded from GitHub


Gifting & Deeplinking Campaigns

We will build a campaign that will listen for requests on the deeplink decision point with a specific promoID. But before creating the campaign we must first create the content that we want to send in the campaign.

Navigate to the Engage > In Game > Actions page and create a Game Parameters action containing the promoType and coinRewardAmount or deeplinkDestination that you want to give to the player, then save it.

(Note : The “Return on every response” checkboxes will determine if the player can receive this reward multiple times on the same campaign step)

Now navigate to the Engage > In Game > Campaigns page and create a new campaign, give it a name and description.

In the “Where in the game” section, select the deeplink decision point, add the promoID and promoChannel parameters to it and populate the values that you want to use for this campaign.

We won’t bother defining a player segment in this example, but we will need to add the Game Parameter action we defined above.

Note, we haven’t set the “final state” toggle on this campaign as we want to hold the player in this state and allow them to receive the gift each time the campaign is triggered, we also set the action to respond on each response. 

Now save your campaign and start it.

Push notification sending.

The final thing to do is to create the push notification that sends the promotion to the player. Navigate to the Engage > Out of Game > Actions page and create an iOS notifcation action containing the promoID and promoChannel key value pairs that you are put in the campaign. They should be added as Custom fields.

You can then setup an Engage > Out Of Game > Campaign that selects a particular player segment and sends them this notification.

If you know your pushNotificationToken or userID you can use the Setup > Engage > Message Test Tool to immediately send a test to your device. 





Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.