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 documentationGetting StartedFAQAltcraft glossary
      Profiles and databasesarrow
    • Subscription resourcesManaging databasesSubscriber profileProfiles import and data updateScheduled customer data importAutomatic data collectionBulk customers profiles updateDouble opt-in subscriptionSuppression listsProfile relationsProfile history exportProfile exportCreating a static segment based on import resultsHow to open a CSV fileMatchingTypes of fields in the databaseGlobal control groupsSubscription Manager
      Communication channelsarrow
      • Email channelarrow
      • Email: ISP interactions best practicesEmail: sending domain configurationEmail: setting up and using postmastersБыстрый старт
        Push channelarrow
        • Mobile Pusharrow
        • Settings & implementation
            Integrate your app with Altcraftarrow
          • Providers: push message structureProcessing and adding a subscriptionEvent registration
          Web pusharrow
        • Preliminary Settings
            Web browser push configurationarrow
          • Firebase Cloud messagingApple SafariMozilla Services
          Connecting Web Push to a WebsiteTransferring Data to the PlatformWeb Push SDK Methods
            Import of subscriptions from third-party push servicesarrow
          • Migrating push subscriptions from third-party servicesHow to transfer push subscriptions configured for Safari?Migration from OneSignal
      SMS channel
        Creating mailing from scratcharrow
      • EmailSMSWeb PushMobile PushWhatsAppViber*™Руководство: SMS-рассылка через VK NotifyMAX BotMAX GroupNotifyTelegram BotTelegram Group
      Communication Channels WorkflowРуководство: SMS-рассылка через УТШРуководство: push-рассылка через сервис от "Согласие"
      Segmentationarrow
    • Static SegmentsDynamic SegmentsUpdatable Segments
        Segmentation Conditionsarrow
      • Segmentation by Profile dataSegmentation by Interactions with EntitiesSegmentation by Activity of the channelSegmentation by external dataSegmentation by external SQL tablesSegmentation 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 editorEmail-templateSMS templatePush templateMAX templateTelegram templateWhatsApp templateViber™ templateNotify template
        Visual editor for email-templatearrow
      • Visual editor interfaceAdding blocksElements and their settingsCustom blocksStyle managerLayer manager
      Template fragmentsImage galleryContent personalizationCreating tables based on array elementsBlock editor for email template
        Altcraft Variables and Functionsarrow
      • Logical expressions in messagesLoops in messagesMarket variables in templatesUsing the JSONPath functionality
        Dynamic content in messagesarrow
      • Dynamic HTML contentDynamic JSON contentContent from SQL database in templatesDynamic API content
      Importing and exporting a message templateImporting a template from a third-party serviceExporting a template from Pixcraft
      Mailingsarrow
    • Mailings calendarBroadcast mailingsRegular mailingTrigger mailingMultivariate testingMailing testingMailing schedulePlacement mailing
      Campaignsarrow
    • Working with CampaignsLocal control groups (LCG)Stratification Violation ErrorAudience expansionAudience building
      Automation scenariosarrow
    • Managing scenariosNodes of the scenarioClassic marketing scenariosStep-by-step welcome scenario guideScenario for automatic notification of the managerAbandoned cart scenario
      Marketarrow
    • Market settings
        Productsarrow
      • How to create a product manuallyHow to import a product from a fileScheduled product importProduct and SKU SegmentsPreparing the YML file
      OrdersMarket variables in message templateGuide: how to send an order confirmation email
      Loyalty programsarrow
    • Loyalty programsLoyalty integration with external systemsБыстрый стартBasic loyalty program use casesOrder SegmentsPromotion codes
      Reports and analyticsarrow
    • Channel reportTraffic report
        Summary reportarrow
      • Summary report metrics
      Cohorts reportLifetime reportFunnels reportGoals reportAudience growth reportClick map reportLoyalty programs reportBounces reportUndeliveries reportReport on global control groups
      Integrationsarrow
      • Action hooksarrow
      • Altcraft Action HooksAction hooks event typesAction Hook Message StructureJSON batch request (HTTP POST action hook)Message to RabbitMQ brokerMessage to RabbitMQ exchangerMessage to Kafka brokerTest event
        Integration of third-party services using Albatoarrow
      • Connecting Altcraft to Albato Launching the welcome scenario using AlbatoTransmitting event dataSetting app a trigger mailingEvent registrationGoogle Sheets and Altcraft integration AmoCRM and Altcraft integration
      Facebook Ads Manager™Google Ads AudiencesMAXYandex.Audience™VK Ads™Static segment synchronizationYandex AppMetrica™Tilda™Lpgenerator™WhatsAppViber*™ integrationIntegration scopeData Transmitted During SynchronizationNotify
      Weblayersarrow
      • Formsarrow
      • Create a formForm constructorAppearanceActions after form activationData analyticsBinding data channel and formsConditional logic in forms and surveysNPS testing
        Pixelsarrow
      • Goal customer actions and scoring
        Pop-upsarrow
      • Creating and publishing a pop-upSetting up a popup in the code editorManaging pop-ups manually via scriptPopup analyticsGuide: pop-up for push subscriptionsCase: Creating a pop-up with the "Wheel of Fortune" widgetBasic cases of placing a popup via the Tag Manager
        Tag Managerarrow
      • Configuring and installing Tag ManagerTrigger typesVariables typesLinking a pixel and the Tag manager
      Settingsarrow
    • Account settingsCustom linksVirtual sendersSending policiesAudit journalTags FAQ
        Users, groups and accessarrow
      • Two-Factor Authentication (2FA)
        Connectionsarrow
      • Connection to Facebook Ads ManagerConnection to Google AdsConnecting to Yandex.Audience™Connection to 360dialogConnection to EdnaConnection to Devino TelecomConnection to SMSTrafficConnection to VK Ads™Connection to MTS OmniChannelCustom Authentication ConnectionOAuth2 connectionBasic Authentication connectionToken Authentication connectionConnection to RapportoMAX connectionConnection to Notify
      Attribute settings
      API requests: where to startarrow
    • Import or update a profileTrigger mailing launchEngage profile in scenario
      Changelogarrow
    • v2026.1.76v2025.4.75v2025.4.74v2025.3.73v2025.2.72v2025.1.71v2024.4.70v2024.3.69v2024.2.68.2v2024.1.68
    Documentation archivelibrary
  • 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.