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
  • Guide: pop-up for push subscriptions

Guide: pop-up for push subscriptions

One of the most common types of pop-ups is the push notification subscription pop-up. This kind of pop-ups will help you to quickly subscribe your website visitors to the Altcraft platform resource. In this article, we will show you how to create and customize a pop-up that will appear on page load for those users who have not yet given permission to display push notifications on your site.

info

For push notifications subscription to work correctly, you must first set up a resource on the platform, as well as add the corresponding script to your site. You can learn more about setting up push notifications there.

Creating and publishing a pop-up​

Go to "Weblayer" — "Pop-ups". Create a new pop-up:

Select the "Slider" type:

Select pop-up template. Then go to the "Customize" section of the menu that opens on the right side of the screen. Paste the following HTML code there:


<div class="ac-slider">
<div class="ac-slider_content">
<h4 class="ac-title">
{{popup('copywriting' 'title' 'text')}}
</h4>
<p class="ac-description">
{{popup('copywriting' 'text' 'text')}}
</p>
<div class="buttons">
<button type="button" id="btn_sub" class="ac-button primary">
{{popup('cta' 'SubscribeText' 'text')}}
</button>
<button type="button" id="btn_cancel" class="ac-button secondary" data-tracking-event="close">
{{popup('cta' 'CancelText' 'text')}}
</button>
</div>
</div>
</div>

As a result, the body of the pop-up should look like this:

Change the format to JS and add code that will initialize the push subscription when the subscribe button is clicked:


const popupContainer = document.querySelector('[data-ac-popup-container]');

if (popupContainer) {
const popupHost = popupContainer.shadowRoot || document;
const subscribeBtn = popupHost.getElementById('btn_sub');

if (subscribeBtn) {
subscribeBtn.addEventListener('click', () => {
// Search for a profile by email. It will also be written to the profile if no matches are found.
// new AKPush().initSubscription({ email: 'example@email.com' });
new AKPush().initSubscription();
popupContainer.style.display = 'none';
});
}
}

tip

You can learn more about the layout and customization of pop-ups in the code editor in this article.

In the Design section, you can adjust the display of elements, their color, the text of inscriptions, and the position of the window on the screen:

When all changes to the pop-up have been made, specify its name and then click "Apply" and "Publish". In the list of pop-ups, check if it is active:

Setting up the Tag Manager​

info

If you haven't worked with Tag Manager or customized the container before, you can read the instructions on how to customize these elements there.

Variable creation​

Go to "Weblayer" — "Tag Manager" menu. Open the container that you use for the site:

Select "Variables" and at the very bottom of the page, create a custom variable:

Specify the variable name, for example "Get Notification permission status", then select the type Custom JavaScript. In the input field, paste the following code:

function getWebNotificationPermission() {
return Notification.permission;
}

Save the created variable:

Tag creation​

Go to "Tags" and create a new tag:

Name it, specify the type "Pop-up" and select the pop-up you created in the previous step:

Customize the activation settings and limits if necessary. Then select triggers. If you have not already created triggers, you can create a new one directly from this window:

You can customize the trigger yourself for any action you need. In our example we use the "Window loaded" type.

In the activation conditions specify "Some events" and the variable created earlier. It is responsible for the permission status for showing notifications. The variable will be set to default in cases where the browser has not yet requested permission to display notifications from the user. In such situations the pop-up will be triggered:

Come up with a name for the trigger and save it. Select it as the trigger to show your pop-up and save the tag. When the tag is saved and all changes to the container have been made, click "Publish":

Select the "Publishing and creating a new version" option, provide a title and description for the version and publish it:

The work of the pop-up window has been set-up. Now when a user gets to the page, the window with an offer to subscribe to push notifications will be shown.

Last updated on Oct 2, 2024
Previous
Popup analytics
Next
Case: Creating a pop-up with the "Wheel of Fortune" widget
  • Creating and publishing a pop-up
  • Setting up the Tag Manager
    • Variable creation
    • Tag creation
© 2015 - 2026 Altcraft, LLC. All rights reserved.