Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    User documentation
    Getting Started
    FAQ
    Altcraft glossary
      Profiles and databasesarrow
    • Subscription resources
      Managing databases
      Subscriber profile
      Profiles import and data update
      Scheduled customer data import
      Automatic data collection
      Bulk customers profiles update
      Double opt-in subscription
      Suppression lists
      Profile relations
      Profile history export
      Profile export
      Creating a static segment based on import results
      How to open a CSV file
      Matching
      Types of fields in the database
      Global control groups
      Subscription Manager
      Communication channelsarrow
      • Email channelarrow
      • Email: ISP interactions best practices
        Email: sending domain configuration
        Email: setting up and using postmasters
        Быстрый старт
        Push channelarrow
        • Mobile Pusharrow
        • Settings & implementation
            Integrate your app with Altcraftarrow
          • Providers: push message structure
            Processing and adding a subscription
            Event registration
          Web pusharrow
        • Preliminary Settings
            Web browser push configurationarrow
          • Firebase Cloud messaging
            Apple Safari
            Mozilla Services
          Connecting Web Push to a Website
          Transferring Data to the Platform
          Web Push SDK Methods
            Import of subscriptions from third-party push servicesarrow
          • Migrating push subscriptions from third-party services
            How to transfer push subscriptions configured for Safari?
            Migration from OneSignal
      SMS channel
        Creating mailing from scratcharrow
      • Email
        SMS
        Web Push
        Mobile Push
        WhatsApp
        Viber*™
        Руководство: SMS-рассылка через VK Notify
        MAX Bot
        MAX Group
        Notify
        Telegram Bot
        Telegram Group
      Communication Channels Workflow
      Руководство: SMS-рассылка через УТШ
      Руководство: push-рассылка через сервис от "Согласие"
      Segmentationarrow
    • Static Segments
      Dynamic Segments
      Updatable Segments
        Segmentation Conditionsarrow
      • Segmentation by Profile data
        Segmentation by Interactions with Entities
        Segmentation by Activity of the channel
        Segmentation by external data
        Segmentation by external SQL tables
        Segmentation by Profile structure
      Best Send Time (BST)
      Logical operators "AND" and "OR"
      Recommendations for working with segments
      Message templatesarrow
      • Working with message templatesarrow
      • Working in the editor
        Email-template
        SMS template
        Push template
        MAX template
        Telegram template
        WhatsApp template
        Viber™ template
        Notify template
        Visual editor for email-templatearrow
      • Visual editor interface
        Adding blocks
        Elements and their settings
        Custom blocks
        Style manager
        Layer manager
      Template fragments
      Image gallery
      Content personalization
      Creating tables based on array elements
      Block editor for email template
        Altcraft Variables and Functionsarrow
      • Logical expressions in messages
        Loops in messages
        Market variables in templates
        Using the JSONPath functionality
        Dynamic content in messagesarrow
      • Dynamic HTML content
        Dynamic JSON content
        Content from SQL database in templates
        Dynamic API content
      Importing and exporting a message template
      Importing a template from a third-party service
      Exporting a template from Pixcraft
      Mailingsarrow
    • Mailings calendar
      Broadcast mailings
      Regular mailing
      Trigger mailing
      Multivariate testing
      Mailing testing
      Mailing schedule
      Placement mailing
      Campaignsarrow
    • Working with Campaigns
      Local control groups (LCG)
      Audience expansion
      Audience building
      Automation scenariosarrow
    • Managing scenarios
      Nodes of the scenario
      Classic marketing scenarios
      Step-by-step welcome scenario guide
      Scenario for automatic notification of the manager
      Abandoned cart scenario
      Marketarrow
    • Market settings
        Productsarrow
      • How to create a product manually
        How to import a product from a file
        Scheduled product import
        Product and SKU Segments
        Preparing the YML file
      Orders
      Market variables in message template
      Guide: how to send an order confirmation email
      Loyalty programsarrow
    • Loyalty programs
      Loyalty integration with external systems
      Быстрый старт
      Basic loyalty program use cases
      Order Segments
      Promotion codes
      Reports and analyticsarrow
    • Channel report
      Traffic report
        Summary reportarrow
      • Summary report metrics
      Cohorts report
      Lifetime report
      Funnels report
      Goals report
      Audience growth report
      Click map report
      Loyalty programs report
      Bounces report
      Undeliveries report
      Report on global control groups
      Integrationsarrow
      • Action hooksarrow
      • Altcraft Action Hooks
        Action hooks event types
        Action Hook Message Structure
        JSON batch request (HTTP POST action hook)
        Message to RabbitMQ broker
        Message to RabbitMQ exchanger
        Message to Kafka broker
        Test event
        Integration of third-party services using Albatoarrow
      • Connecting Altcraft to Albato
        Launching the welcome scenario using Albato
        Transmitting event data
        Setting app a trigger mailing
        Event registration
        Google Sheets and Altcraft integration
        AmoCRM and Altcraft integration
      Facebook Ads Manager™
      Google Ads Audiences
      MAX
      Yandex.Audience™
      VK Ads™
      Static segment synchronization
      Yandex AppMetrica™
      Tilda™
      Lpgenerator™
      WhatsApp
      Viber*™ integration
      Integration scope
      Data Transmitted During Synchronization
      Notify
      Weblayersarrow
      • Formsarrow
      • Create a form
        Form constructor
        Appearance
        Actions after form activation
        Data analytics
        Binding data channel and forms
        Conditional logic in forms and surveys
        NPS testing
        Pixelsarrow
      • Goal customer actions and scoring
        Pop-upsarrow
      • Creating and publishing a pop-up
        Setting up a popup in the code editor
        Managing pop-ups manually via script
        Popup analytics
        Guide: pop-up for push subscriptions
        Case: Creating a pop-up with the "Wheel of Fortune" widget
        Basic cases of placing a popup via the Tag Manager
        Tag Managerarrow
      • Configuring and installing Tag Manager
        Trigger types
        Variables types
        Linking a pixel and the Tag manager
      Settingsarrow
    • Account settings
      Custom links
      Virtual senders
      Sending policies
      Audit journal
      Tags FAQ
        Users, groups and accessarrow
      • Two-Factor Authentication (2FA)
        Connectionsarrow
      • Connection to Facebook Ads Manager
        Connection to Google Ads
        Connecting to Yandex.Audience™
        Connection to 360dialog
        Connection to Edna
        Connection to Devino Telecom
        Connection to SMSTraffic
        Connection to VK Ads™
        Connection to MTS OmniChannel
        Custom Authentication Connection
        OAuth2 connection
        Basic Authentication connection
        Token Authentication connection
        Connection to Rapporto
        MAX connection
        Connection to Notify
      Attribute settings
      API requests: where to startarrow
    • Import or update a profile
      Trigger mailing launch
      Engage profile in scenario
      Changelogarrow
    • v2026.1.76
      v2025.4.75
      v2025.4.74
      v2025.3.73
      v2025.2.72
      v2025.1.71
      v2024.4.70
      v2024.3.69
      v2024.2.68.2
      v2024.1.68
    Documentation archive
    library
  • Weblayers
  • Pop-ups
  • Setting up a popup in the code editor

Setting up a popup in the code editor

To work directly with the pop-up code, go to the "Settings" section. In the upper right corner you can switch between HTML, CSS and JavaScript code:

To make it easier to work in the editor, use the following functions in the toolbar:

— bold text;

— italic;

— strikethrough text ;

— adding or editing links;

— adding images from the platform gallery;

— the list of variables and functions of the editor. Using this button you can add dynamic content to the popup.

info

You cannot add other HTML elements before the top-level div element, otherwise the template preview will become unavailable.

Creating a parameter​

You can also create new settings in this section. When saved, they will appear on the "Design" tab. Thus, users who are not familiar with the code will be able to change the values of custom parameters in the visual editor.

To create a new parameter, place the cursor in the editor line where you want to add the parameter. Click the "Add parameter" button in the upper left corner of the editor. In the new window select:

  • Parameter category name. Built-in parameters in the visual editor are grouped by category. You need to select one of the categories for the custom parameter. You can also create your own category. To do this, enter the category name and press Enter.

  • Parameter name. Enter the name of the parameter to be used in the editor. The name must be unique within the category.

  • Parameter type. Select the type of value that the parameter will contain (for example, text, numeric value, font family, input field options, etc.).

  • Current value. Specify the default value for the parameter. This field is optional.

Once configured, click the "Insert" button at the bottom of the page. The parameter will be added in the following form:

{{popup('<category_name>' '<parameter_name>' '<parameter_type>')}}

The created parameter will appear in the visual editor in the selected category. After saving the popup, the value of the new parameter can be edited by other platform users:

Popup elements settings​

When creating a pop-up, the platform offers many ready-made templates, but sometimes you need to make changes to an existing template. Below are recommendations on how to do this.

info

The field name (name attribute) before and after the expression should not contain extra characters:

Correct usage: name="{{popup('form' 'week-field' 'fieldData')}}" Incorrect usage: name="{{popup('form' 'week-field' 'fieldData')}}-"

Overlay layer​

The overlay layer is designed to visually highlight the pop-up. Defined by an element with class ac-popup-overlay. By default, this element has a translucent background and occupies the entire available screen area.

Usage example:

<div class="ac-popup-overlay">
<!--Popup contents-->
</div>

Text content​

By default, two types of text are available: heading and paragraph.

Usage example:

<!-- Title -->
<h4 class="ac-title">
{{popup('copywriting' 'title' 'text')}}
</h4>

<!-- Paragraph -->
<div class="ac-description">
{{popup('copywriting' 'text' 'text')}}
</div>

Images​

There are two ways to add an image to a popup:

  • as an element with the <img> tag
  • using the background-image CSS property

An example of adding an image using the <img> tag:

<div class="ac-image">
<img
class="ac-image_content"
src="{{popup('image' 'image' 'image' 'src')}}"
alt="{{popup('image' 'image' 'image' 'alt')}}"
/>
</div>

An example of adding an image using the background-image CSS property:

background-image: url("{{popup('background' 'backgroundImage' 'image' 'src')}}");

Form​

For the popup to work correctly, all input fields and the form submit button must be placed in an element with the <form> tag.

Usage example:

<form id="ac-form" class="ac-form">
<!-- Form content -->
</form>

Input fields​

For correct display, each input field must be inside an element with the ac-field class. To add a title, it is recommended to use an element with the ac-label class. Be sure to specify the name attribute, if it is not specified, the value of the input field will not be sent to the server and will not be saved in the platform.

If you intend to use validation rules, you must add an element with the class ac-validation-msg.

Example of an email input field:

<div class="ac-field">
<label class="ac-label" for="email">
{{popup('copywriting' 'emailLabel' 'text')}}
</label>
<input
id="email"
type="email"
class="ac-input"
name="{{popup('form' 'email' 'fieldData')}}"
placeholder="{{popup('copywriting' 'emailPlaceholder' 'text')}}"
/>
<div class="ac-validation-msg" for="email"></div>
</div>

Example of a phone number input field:

<div class="ac-field">
<label class="ac-label" for="phone">
{{popup('copywriting' 'phoneLabel' 'text')}}
</label>
<input
id="phone"
type="tel"
class="ac-input"
name="{{popup('form' 'phone' 'fieldData')}}"
placeholder="{{popup('copywriting' 'phonePlaceholder' 'text')}}"
/>
<div class="ac-validation-msg" for="phone"></div>
</div>
caution

To correctly collect statistics for input fields, you should set the type attribute, the value of which will correspond to the type of input data.

The following field types are available:

  • <input type="text"> - basic text field as a string.
  • <input type="email"> - field for email address. Before sending, it is checked that the input value contains either an empty string or one valid e-mail address.
  • <input type="tel"> - input field for a phone number; line breaks are automatically removed from the input value.
  • <input type="number"> - input field for a float format number.
  • <input type="search"> - one-line text field for entering search strings.
  • <input type="url"> - field for URL editing. The entered value must contain either an empty string or a valid absolute URL.
  • <input type="color"> - a color control element.
  • <input type="date"> - control element for entering date (year, month and day, no time).
  • <input type="datetime"> - control element to enter the date and time (hour, minute, second and fraction of a second) according to the UTC time zone.
  • <input type="datetime-local"> - control element for entering date and time without time zone.
  • <input type="week"> - control element for entering the date containing the number week-year and week number without time zone.
  • <input type="month"> - control element for entering month and year without time zone.

Form submit button​

To create a form submit button, it is recommended to use an element with class ac-form_submit, which contains a button element with type submit and class ac-button.

Usage example:

<div class="ac-form_submit">
<button type="submit" class="ac-button">
{{popup('cta' 'text' 'text')}}
</button>
</div>

Close button​

To create a button to close a popup, it is recommended to use the popup function, passing the appropriate parameters to it.

Usage example:

{{popup('closeButton' 'closeButton' 'closeBtn')}}

The element has several different options, which can be viewed on the Design —> "Close" button tab.

Additional event tracking​

To track events, you need to add the data-tracking-event="[event-name]" attribute to the html element with which the event is associated. Replace [event-name] with the name of the event. The following events are supported:

  • click - click on an element
  • close — closing the popup

An example of registering clicks on a popup element:

<div data-tracking-event="click"></div>
tip

If the popup contains an HTML form element, then when the form submit button is clicked, the action of filling out the form will be automatically registered. That is, in this case, to register an event, you do not need to add an additional attribute to the form button.

Last updated on Oct 25, 2024
Previous
Creating and publishing a pop-up
Next
Managing pop-ups manually via script
  • Creating a parameter
  • Popup elements settings
    • Overlay layer
    • Text content
    • Images
    • Form
    • Input fields
    • Form submit button
    • Close button
    • Additional event tracking
© 2015 - 2026 Altcraft, LLC. All rights reserved.