Repro - Mobile Analytics for growth
日本語
Sign Up Back to Dashboard
  • System Requirements
  • Dashboard Guide
    • Analytics
    • Marketing
      • Push Notification
      • Event Based Push Notification
      • In-App Message
      • HTML In-App Message
        • Create HTML In-App Message
          • Use standard templates
          • Use the Original template
        • Edit HTML In-App Message
          • Copy the pattern
          • Duplicate a HTML In-App Message
        • Edit the contents
          • Set the element which closes the message
          • Setting the action button for campaign measurement
          • Setting the images for HTML In-App Messages
        • Use JavaScript in HTML In-App Messages
          • How to use
          • Configure event tracking and user profile settings from within HTML in-app messages
          • Get event properties from within HTML In-App Messages
        • All other settings
      • Web Message
      • Custom Message
      • Custom JavaScript
      • Available HTML tags and attributes for custom messages
      • Silver Egg Recommendation Messages
      • Viewer Count
      • Web Push Notification
      • Remote Config
      • Audience
      • Scenario
      • Insert Variable
      • Personalization by Liquid
      • Incentive code management
      • Broadcast mail(β)
      • Newsfeed
    • Data Export
    • Settings
    • Booster User Guide
    • Account
    • Misc
  • Development Guide
  • Release Notes
  • FAQ

HTML In-App Message¶

Warning

  • When using HTML In-App messages, make sure someone with extensive knowledge and experience with HTML/CSS/JavaScript is handling and editing.

  • Unless using the template as is, CSS necessary for Responsive Design or CSS animation is not prepared on the HTML In-App message editing page. Please prepare accordingly.

Create HTML In-App Message¶

There are two ways to create a Html In-App Message.

Use standard templates¶

  1. Select a message you wish to use from the template list. Select a custom type from the In-App message editing screen.

HTML inapp message select custom
  1. By clicking the custom button, the text editor will appear on the left of the screen. Your choice of HTML and CSS templates will be set in the editor. Please edit appropriately.

HTML inapp message custom

Note

  • All text and images created in the standard version will be passed onto the custom version.

  • Anything edited on the custom version will not be transferred to the standard version. Also, when transferring from custom to standard while in the process of editing, all content will be deleted.

Use the Original template¶

Select the Original template(ID1000) from the list of templates.

HTML inapp message original template

Edit HTML In-App Message¶

Copy the pattern¶

  1. Click copy pattern under ADD.

HTML inapp message duplicate pattern
  1. A copied pattern will appear, and the message is ready to be edited. If you duplicated the HTML In-App Message pattern, you will not be able to change it to the standard version.

Duplicate a HTML In-App Message¶

  1. Select the HTML In-App Message and click duplicate. You will not be able to change to a standard message if the original copied message is from the custom version.

HTML inapp message duplicate campaign
  1. Open the message editor and edit your message.

Edit the contents¶

Editing the contents. Please follow the below rules for HTML when editing.

  • State it so that the top level element will be singular.

<!-- Good -->
<div>
  <div>message1</div>
  <div>message2</div>
<div>

<!-- Bad -->
<div> message1</div>
<div> message2</div>
  • State it so that the top level element will be surrounded by a tag.

<!-- Good -->
<p>message</p>

<!-- Bad -->
message

Set the element which closes the message¶

  1. Add the data-repro--close attribute to the target element.

<div class="btn" data-repro--close> ☓ </div>

Setting the action button for campaign measurement¶

By setting attributes for action buttons, it is possible to count clicks on any element as Button 1 Clicks and Button 2 Clicks displayed in the distribution result of effect measurement.

  1. Add attributes data-repro--primary-btn and data-repro--secondary-btn to each element.

<div class="btn" data-repro--primary-btn>button_1</div>
<div class="btn" data-repro--secondary-btn>button_2</div>
  1. In case of specifying the tracking event name when clicking the button1 and 2, set the attribute data-repro--primary-cta-event or data-repro--secondary-cta-event.

<div class="btn" data-repro--primary-btn data-repro--primary-cta-event="tap_button_1">button_1</div>
<div class="btn" data-repro--secondary-btn data-repro--secondary-cta-event="tap_button_2">button_2</div>

Note

  • data-repro--primary-cta-event and data-repro--secondary-cta-event can not be set more than twice in the same HTML.

  • In case that none of attribute data-repro--primary-cta-event or data-repro--secondary-cta-event is given, in_app_message will be set as the tracking event name.

  • If you write as data-repro--primary-cta-event="", in_app_message will be set as the tracking event name. If you write as data-repro--primary-secondary-event="", the tracking event name will not be set and no event will be fired even if the element is clicked.

Setting the images for HTML In-App Messages¶

  1. To insert an image in a message, bring the cursor to the desired place in the HTML, and click the “add image” button in the text editor below.When you select the template with images, the image will be added automatically at the position of the image on the template without placing the cursor.

HTML inapp message upload image
  1. When you upload an image from a folder saved onto the computer,the following tag img src= and a URL for the image will appear where the cursor is, and you will be able to see the image in the preview.

HTML inapp message uploaded image

Note

  • The maximum image size allowed to upload using the “add image” button is 1MB. There is no limit to the file size if you wish to not use the “add image” button, however our recommended image size will still be 1MB.

  • If you wish to use the “add image” button using a template without an image, designate the cursor within the following tag <div class="repro-xxxx--container">. If you do not designate the cursor within the tag, a URL for the image and the following tag img src= will be created at the end of the HTML, and the image will be uploaded outside of the message.

  • Please verify the actual image since the preview function is only within the operating screen.

Use JavaScript in HTML In-App Messages¶

Only the ID1000 template can write JavaScript. Richer expressions are possible by using JavaScript.

Warning

  • To use JavaScript in HTML In-App Messages, You need to use Repro iOS SDK 5.5.0 or higher and iOS 9 or higher, or Repro Android SDK 5.4.0 or higher and Android 5 or higher. JavaScript does not work below the target version.

  • We are not responsible for any loss caused by the use of this feature. For more information, please see the Repro Terms of Use(https://repro.io/company/legal/term/)

How to use¶

  1. Please refer to In-App Message and create an In-App Message. At that time, select the template with ID1000.

  2. Select "JavaScript" in the content of the edit screen in message created in 1. You can edit JavaScript.

../../_images/custom_js_editor.en1.png

If you would like an implementation example, please contact us through the live chat on the bottom right of the screen or the sales representative in charge of your account.

Note

  • Please note that the script is executed as a local function scope .

  • Please note that the transpilation for the script is not done.

  • It does not load library functions such as jQuery, though it does not restrict the contents of JavaScript.

  • Linter in the JavaScript editor uses JSHint.

  1. You can use preview feature to see if it works successfully.

../../_images/custom_js_preview.en1.png

Note

  • Please verify the actual image since the preview function is only within the operating screen.

  • JavaScript can only be used with template ID1000.

Configure event tracking and user profile settings from within HTML in-app messages¶

By utilizing JavaScript inside of HTML In-App Messages, you can track arbitrary events and set user profile values.

Example implementation

Please note that the following scripts are just samples.

Example of registering an email address entered in a HTML form presented by an In-App Message.

// Email address input form
var email = document.getElementById("email-form");
// Register button
var registerButton = document.getElementById("register-button");
// Register the e-mail address to user profile
registerButton.onclick = function() {
    Repro.setUserEmailAddress(email.value);
    // Close the in-app message
    Repro.closeDialog();
}

See User Profile and Event Tracking for other detailed usage instructions.

Warning

  • To track any event and set user profile values in HTML In-App Messages, you must use iOS SDK 5.19.0 or higher and Android SDK 5.18.0 or higher.

Get event properties from within HTML In-App Messages¶

By utilizing JavaScript, the properties of the event that triggered the opening of the In-App Message can be obtained.

Example implementation

An example of tracking an event when the store screen is opened and displaying an image according to the user's location in an In-App Message that appears when an event is triggered

// This is a sample of an application being developed in Java

// Runs when the store page is opened
Map<String, Object> properties = new HashMap<>();
properties.put("residenceArea", "tokyo");
Repro.track("openedStorePage", properties); // Shows an in-app message
// Replace the src property of a <img src=""> tag according to the user's location
document.getElementById("topImage").src = "https://example.com/img/area/" + Repro.triggeredEventProperties.residenceArea + ".jpg";

Warning

  • To retrieve event properties in HTML app messages, iOS SDK 5.19.0 or higher and Android SDK 5.18.0 or higher must be used.

All other settings¶

For all other message settings including like delivery setting, please refer to In-App Message .

  • « In-App Message
  • Web Message »

About Us Careers Terms of Service Privacy Policy Cookie Policy

© 2022 Repro Inc.