Step by Step

Step-by-Step Guide to Creating an App and Campaigns

boardin_page_il.png

Table of Contents

This guide explains the basics of working with the SDK, covering backend configuration via the web interface and corresponding code setup.

By completing this guide, you'll achieve a minimal SDK integration with support for interstitial ads, in-app purchases, and rewarded ads. These are examples, and additional campaign types can be explored [here].

It focuses on basic campaign configuration, with links to detailed documentation provided at the end of each section.

How to Create and Configure an Application in Magify

If you created the application during onboarding, you can skip this step.

Step 1: Create an Application with Basic Parameters

  1. Navigate to the Application section.
  2. Click on the Create New button.
  3. In the application creation form, fill out all fields. Use the data provided by your project or product managers.
  4. For detailed descriptions of all fields (both mandatory and optional), refer to the article Create New Application.

Step 2: Define Default User Profile

On this step, you define the parameters to create a "default user profile" for your application. For instance, this could be a user from the United States with the latest iPhone, the newest OS version, and other key characteristics (your average user). This default configuration is used to generate a JSON file based on the profile you’ve configured. The JSON file will be generated in the next step of this instruction and then embedded into your app's build. It ensures that if a user launches the app for the first time without an internet connection, they still have access to a basic configuration.

  1. Go to the App Config section.
  2. Click on the Create New button.
  3. In the form, fill out the fields required to retrieve your app's configuration.

The fields below are necessary for retrieving the default configuration. Other fields, listed further down, are used for custom configuration and are not required for basic setup.

Mandatory fields for default configuration:

  • Application: Select your application from the dropdown menu.
  • Device: Choose the most popular device type for your app’s audience.
  • Orientation: Select the app's orientation.
  • OS version: Choose the most popular operating system version.
  • Initial app version: Select the first version of your application.
  • Language: Specify the language for the default configuration. This should match the primary language of your app's users.
  • Country: Specify the country for the default configuration. This should reflect the primary market of your app.
  • Launch date: Set the potential user's app download date and time. This date acts as a starting point; all subsequent downloads are included in the configuration scope. The download date must be later than or equal to the app version creation date.

For detailed descriptions of all fields (both mandatory and optional), refer to the article App Config. [добавить ссылку на статью].

Step 3: Download Configuration Files for the Application

  1. Navigate to the App Version section.
  2. Use the Add Filters dropdown in the top-left corner to select your application.
  3. Click Apply in the top-right corner to filter the results.
  4. Locate the desired version in the table and click the Default Config (Actions: Get default config) button next to it.
  5. The Default Config file will be downloaded to the Downloads folder on your device.

Preparatory Steps for Campaign Creation

A campaign is an event handler that performs actions in response to application events. Examples include:

  • level_opened: Displays interstitial ads.
  • hint_tapped: Promotes in-app purchases.
  • session_start: Triggers rewarded ads.

A campaign consists of configurations that define what action to take and under what conditions. This core SDK feature enables tailored engagement and monetization.

Before setting up a campaign, create a user segmentation to define the target audience.

Create a Segmentation

Segmentation divides users into groups (segments) based on characteristics like app version, country, or device, enabling targeted campaigns. For more details, refer to the Segmentation guide. [add link].

Examples:

  • A segment could include users on a specific version of your application.
  • Another segment might target users from a specific country or using a particular device.

For more information, refer to the Segmentation.[добавить ссылку на статью].

  1. Navigate to the Segmentation section in the admin panel.
  2. Click Create New.
  3. Fill out all required fields:
    • Name: Enter a name for the segment. For example 1.0.0+ (indicating version 1.0.0 and above).
    • Application: Select your application from the dropdown list.
    • App Version: Under the App Version subsection, select the previously created version of your application in the App version from field. For example: 1.0.0.
  4. Save the segment by clicking the Save button.

Once the segment is created, it can be linked to a campaign. This enables you to target specific user groups and dynamically trigger actions in response to application events.

Creating an Interstitial Campaign

Step 1: Navigate to the Campaign Section

  • Go to the Campaign section in the admin panel.
  • Click Create New.

Step 2: Fill Out Mandatory Fields

Complete all required fields.

Basic Settings (Top Section):

  • Name: Enter a unique name for the campaign.
  • Application: Select your application from the dropdown.
  • Type: Choose interstitial campaign.
  • Priority: Leave this value as 1 by default.
  • Status: Set the campaign status to running (active).
  • Leave all fields under Status (Subscription, In-App, etc.) as default unless instructed otherwise.

Step 3: Fill Out the Extension Block

  • Segmentations: Select the previously created user segment.
  • Splash Screen**: Choose **"No"** to disable the splash screen before showing the interstitial ad.
    • Timeout: Specify how many seconds the system should attempt to load the interstitial ad if it is not ready when triggered. Keep the default value of 5.

Step 4: Configure the Events Block

The Event specifies the trigger that will activate the campaign within the application.

  1. Click +add new item to create a new event.
  2. In the Native Element form that opens, fill out the required fields:
    • Name: Enter the technical name for the game event. For example: level_opened
    • Human readable name: Enter a readable name for the game event (e.g., the same value as Name for consistency).
    • Type name: Select Event.
  3. Save the event by clicking Save.
  4. After creating the event, ensure it is added to the corresponding field in the campaign. Alternatively, it may be automatically added to the campaign. A unique event is created once and can be used across multiple campaigns.

Step 5: Configure the Global Counter

In the Global Counter section for event:

  • For Global From Value and Global Period, set the value to 1 and 1. This configuration ensures that the campaign will be displayed every time the event is triggered (on the first occurrence each time). [добавить ссылку на статью].

Step 6: Save the Campaign

  • Click Save to finalize the campaign configuration.

Additional Resources

  • Video tutorial for creating a campaign: here.[добавить ссылку на статью].
  • Video tutorial for creating a segment: here.[добавить ссылку на статью].
  • Recommendations on naming campaigns and segments: here.[добавить ссылку на статью].
  • To include this campaign in the default configuration, follow the recommendations in this section.[добавить ссылку на статью].

Creating an In-App Campaign

Step 1: Navigate to the Campaign Section

  • Go to the Campaign section in the admin panel.
  • Click Create New.

Step 2: Fill Out Mandatory Fields

Complete all required fields.

Basic Settings (Top Section):

  • Name: Enter a unique name for the campaign. For example:IOS IP WW NoUI 10H 3 99
  • Application: Select your application from the dropdown.
  • Type: Choose In-App campaign.
  • Priority: Leave this value as 1 by default.
  • Status: Set the campaign status to running (active).
  • Leave all fields under Status (Subscription, In-App, etc.) as default unless instructed otherwise.

Step 3: Fill Out the Extension Block

  • Segmentations: Select the previously created user segment.
  • Creative: Select Default No UI – it is automatically generated when the application is created, so there is no need to create it manually.

Step 4: Configure the Events Block

The Event defines the in-game event that will trigger the campaign.

  1. Click +add new item to create a new event.
  2. In the Native Element form that opens, fill out the required fields:
    • Name: Enter the technical name for the game event. For example: hint_tapped (Clicking the help button in the game displays a reward hint).
    • Human readable name: Enter a readable name for the game event (e.g., the same value as Name for consistency).
    • Type name: Select Event.
  3. Save the event by clicking Save.
  4. After creating the event, ensure it is added to the corresponding field in the campaign. Alternatively, it may be automatically added to the campaign upon event creation. A unique event is created once and can be used across multiple campaigns.

Step 5: Configure the Global Counter

In the Global Counter section for event:

  • For Global From Value and Global Period, set the value to 1 and 1. This configuration ensures that the campaign will be displayed every time the event is triggered (on the first occurrence each time). [добавить ссылку на статью].

Step 6: Setting Up Nested Campaigns with Product ID and Context

An In-App Campaign assumes that the user receives a reward after purchasing an offer. The reward is divided into two elements: Product ID and Product ID Context.

  • Product ID: This represents the item created in the console and imported into Magify. It defines the price and the item being sold in the store (e.g., a $10 purchase).
  • Product ID Context: This specifies what the user receives in the game as a reward for the purchase, such as 100 hints or 10 other boosters.

In the SDK, a product refers to any in-game object that the player receives upon completing a campaign. For example, an in-app purchase might provide hints or boosters as a reward. To specify the reward, you need to configure the product context in the nested section at the bottom of the campaign configuration.

Example: You are selling 10 hints for $3.99.

  • The Product ID is the item created in the console, representing the $3.99 purchase.
  • The Product ID Context specifies that the user will receive 10 hints.

Click on the + Add Nested Campaigns button.

Create a New Product ID

  1. Under the Product ID field, click +add new item.
  2. In the Product ID form that appears, complete all required fields:
    • Name: Enter the technical name for the Product ID. For example: product_A_id. This type of Product ID is created in the console.
    • Human Readable Name: Provide a user-friendly name for the Consumable Product ID (we recommend duplicating the value from the Name field).
    • Type Name: Select Consumable Product ID.Cost: Enter the offer price. For example: 3.99. Use the price specified in the console during product creation.
    • Customs: The Customs field allows you to define additional configuration parameters for the product in JSON format. This field is designed to provide flexibility for adding custom attributes or logic that the system can interpret during product processing. This field is optional and can be used for use cases such as:

Example:

{
  "items": [
    {
      "bonus": "hint",
      "count": 10
    }
  ]
}

Save the product by clicking Save. After creating the Product ID, ensure it is added to the corresponding field in the campaign. Alternatively, it may be automatically added to the campaign.

Create a New Product ID Context

To specify the reward users will receive for purchase:

  1. Click +add new item under the Product ID Context field.
  2. In the Product ID Context form that appears, complete all required fields:
    • Name: Enter the context name (use the associated Consumable Product ID and include details like the quantity and type of reward).
    • Type: Choose In-App Product ID Context.
    • Product ID: Enter a Consumable Product ID.
    • Customs: You can replicate the Customs field from the Product ID here.
  3. Save the Product ID Context by clicking Save.
  4. After creating the Product ID Context, ensure it is added to the corresponding field in the campaign. Alternatively, it may be automatically added to the campaign.

Configure the Nested Campaign

In our system, campaigns can have hierarchical structures and nesting. This means one campaign group can be organized under another campaign. To describe these structures, we use the following terminology:

  • Parent Campaign: The primary campaign that may contain one or more nested campaigns or none at all. [добавить ссылку на статью по Native Elements Group].
  • Nested Campaign: A child campaign contained within a Parent Campaign. Transactions and actions are associated specifically with Nested Campaigns.

Assign a Name to the nested campaign. We recommend copying the parent campaign name and removing unnecessary platform details.For example: If the parent campaign is named IOS IP WW NoUI 10H 3 99, the nested campaign can be named IP WW NoUI 10H 3 99.

Step 7: Save the Campaign

  • Click Save to finalize the campaign configuration.

Additional Resources

  • Video tutorial for creating a campaign: here.[добавить ссылку на статью].
  • Video tutorial for creating a segment: here.[добавить ссылку на статью].
  • Recommendations on naming campaigns and segments: here.[добавить ссылку на статью].
  • To include this campaign in the default configuration, follow the recommendations in this section.[добавить ссылку на статью].

Creating an Rewarded Video Campaign

Step 1: Navigate to the Campaign Section

  • Go to the Campaign section in the admin panel.
  • Click Create New.

Step 2: Fill Out Mandatory Fields

Complete all required fields.

Basic Settings (Top Section):

  • Name: Enter a unique name for the campaign. For example: IOS RW WW SC Welcome Pack 3H
  • Application: Select your application from the dropdown.
  • Type: Choose Rewarded Video Campaign.
  • Priority: Leave this value as 1 by default. [добавить ссылку на статью].
  • Status: Set the campaign status to running (active).
  • Leave all fields under Status (Subscription, In-App, etc.) as default unless instructed otherwise.

Step 3: Fill Out the Extension Block

  • Segmentations: Select the previously created user segment.

Step 4: Create a Creative

  1. Click +add new item to create a new creative.
  2. Fill out the required fields in the form that opens:
  • Name: Enter a technical name for the creative item. For example: SC Welcome Pack.
  • Application: Select the relevant application from the dropdown menu.
  • Type: Choose the creative type Screen Creative.
  • Key: Enter a unique key associated with this creative. For example: welcome_pack.
  • Customs Section: Use the provided editor to add any additional configurations in JSON format, if you need.Save the creative by clicking Save.After creating the creative, ensure it is added to the corresponding field in the campaign. Alternatively, it may be automatically added to the campaign upon creative creation.

Step 5: Configure the Events Block

The Event defines the in-game event that will trigger the campaign.

  1. Click +add new item to create a new event.
  2. In the Native Element form that opens, fill out the required fields:
    • Name: Enter the technical name for the game event. For example: session_start
    • Human readable name: Enter a readable name for the game event (e.g., the same value as Name for consistency).
    • Type name: Select Event.
  3. Save the event by clicking Save.
  4. After creating the event, ensure it is added to the corresponding field in the campaign. Alternatively, it may be automatically added to the campaign upon event creation. A unique event is created once and can be used across multiple campaigns.

Step 6: Configure the Global Counter

In the Global Counter section for event:

  • For Global From Value and Global Period, set the value to 1 and 1. This configuration ensures that the campaign will be displayed every time the event is triggered (on the first occurrence each time).[добавить ссылку на статью].

Step 7: Setting Up Nested Campaigns with Product ID and Context

A Rewarded Video Campaign assumes that the user receives a reward after watching a rewarded ad. This reward must be created as a Product (Product ID – defining the price and the item being offered) and linked to a Context (Product ID Context – specifying what the user will receive after completing the action).

Click on the + Add Nested Campaigns button.

Create a New Product ID

Initially, there will be no Product ID available. To create a new one:

  1. Under the Product ID field, click +add new item.
  2. In the Product ID form that appears, complete all required fields:
    • Name: Enter the technical name for the in-game event. For example: product_A_id.
    • Human Readable Name: Provide a user-friendly name for the Rewarded Product ID (we recommend duplicating the value from the Name field).
    • Type Name: Select Rewarded Product ID.
    • Customs: You can leave the "Customs" section empty, as the reward will be managed through the context configuration.

Save the product by clicking Save. After creating the Product ID, ensure it is added to the corresponding field in the campaign. Alternatively, it may be automatically added to the campaign.

Create a New Product ID Context

To specify the reward users will receive for watching an reward ad

  1. Click +add new item under the Product ID Context field.
  2. In the Product ID Context form that appears, complete all required fields:
    • Name: Enter the context name (use the associated Rewarded Product ID and include details like the quantity and type of reward). For example: rv_product_A_id 3H.
    • Type: Choose Rewarded Product ID Context.
    • Product ID: Enter a Rewarded Product ID. For example: rv_product_A_id.
    • Customs: The Customs field allows you to define additional configuration parameters for the product in JSON format. This field is designed to provide flexibility for adding custom attributes or logic that the system can interpret during product processing. This field is optional and can be used for use cases such as:Specifying product properties (e.g., bonuses, multipliers). Configuring dynamic behaviors tied to the product.Including additional metadata.

Example:

{
  "items": [
    {
      "bonus": "hint",
      "count": 3
    }
  ]
}

Configure the Nested Campaign

Assign a Name to the nested campaign. We recommend copying the parent campaign name and removing unnecessary platform details. For example: If the parent campaign is named IOS RW WW SC Welcome Pack 3H, the nested campaign can be named RW WW SC Welcome Pack 3H.

Step 7: Save the Campaign

  • Click Save to finalize the campaign configuration.

Additional Resources

  • Video tutorial for creating a campaign: here.[добавить ссылку на статью].
  • Video tutorial for creating a segment: here.[добавить ссылку на статью].
  • Recommendations on naming campaigns and segments: here.[добавить ссылку на статью].
  • To include this campaign in the default configuration, follow the recommendations in this section.[добавить ссылку на статью].