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)Audience 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
  • Communication channels
  • Push channel
  • Web push
  • Transferring Data to the Platform

Transferring Data to the Platform

When a user grants permission to receive notifications, the platform automatically creates a profile for them. In addition to profile creation, other additional data can also be transmitted. In this article, we will explain how to configure a script to collect information about the user and their actions.

tip

Setting up Web Push on the Altcraft platform requires using Web Push SDK methods. You can learn more about SDK methods in this article. Instructions for installing the SDK on your site can be found here.

Importing Client Profiles When Subscribing to Web Push Notifications​

When a user subscribes to Web Push notifications, a new profile will be added to the Databases and the Resource where the Toolkit embedded on the site was generated.

info

If a database profile has previously opened your email newsletter from the same browser in which they are now subscribing to push, the subscription will be added to that profile. In this case, a new profile will not be created.

When a subscriber clicks on a push notification (following a link), the Altcraft platform collects profile data:

  • Country, region, time zone, city, postal code, and IP address from which the push subscription occurred;
  • Browser and operating system of the subscriber.

If the token becomes outdated or the user resubscribes to push, the platform will automatically update their subscription and issue a new token. This prevents duplicate profiles from being created in the database.

note

Mobile browsers also support Service Worker and Web Push notifications.

Transferring Client Data When Importing a Profile via Push Channel​

At the time of push notification subscription registration, any known user data can be recorded into the new user's profile. For example, the client's first and last name, date of birth, pages viewed, and other business-related information. At the same time, you can check if an existing subscriber already has the same data.

Example with email matching in the resource and adding the user's first and last name:

const akPush = new AKPush();
akPush.initSubscription(
{
email: 'example@email.com'
}, // Matching of profile by email. If no match is found, it will be recorded in the profile.

{
_fname: 'Anatoly',
_lname: 'Wasserman'
} // Record first and last name in the subscriber's profile
)

If multiple databases are linked to a resource, you can specify the ID of the database where the profile should be imported. Example with email matching in database id=1:

const akPush = new AKPush();
akPush.initSubscription(
{
db: 1
email: 'example@email.com'
}, // Matching of profile by email. If no match is found, it will be recorded in the profile.

{
_fname: 'Anatoly',
_lname: 'Wasserman'
} // Record first and last name in the subscriber's profile
)

Example with email matching in databases id=15 and id=20:

const akPush = new AKPush();
akPush.initSubscription(
{
db: [15,20]
email: 'example@email.com'
}, // Matching of profile by email. If no match is found, it will be recorded in the profile.

{
_fname: 'Anatoly',
_lname: 'Wasserman'
} // Record first and last name in the subscriber's profile
)
tip

The list of profile fields is provided in this article.

Updating Profile Data and Suspending Subscriptions​

caution

akPush.updateSubscription will return an error if an up-to-date token has not been obtained via akPush.initSubscription, or if it has been removed from the cache using akPush.removeToken.

A user subscribed to push notifications in a browser can change their status. For example, they may log into their personal account and receive a different matching profile. In this case, the current push subscription must be disabled on the previous profile and enabled on the new one. To achieve this, use the akPush.updateSubscription method:

const akPush = new AKPush();
akPush.updateSubscription(
{
db: [15,20]
email: 'example@email.com'
},

{
_fname: 'Anatoly',
_lname: 'Wasserman'
}, // Record first and last name in the subscriber's profile
false // Flag for inexclusive, determines whether to pause all subscriptions to the resource with the current browser token for other profiles (default)
)

Web Push Subscription Creation and Update Events​

Platform users can subscribe to events for push subscription creation and updates (subscriber token changes). When such an event occurs, subscription data can be sent to an external server using additional code.

To subscribe to events, add the following code to your site's pages:

AKPush.events.on('subscribe', (data) => { // Subscribe to the 'subscribe' event
console.log(data);
});
AKPush.events.on('update_subscription', (data) => { // Subscribe to the 'update_subscription' event
console.log(data);
});

This code will log the subscriber's token, as well as browser and push provider information.

Last updated on Jan 28, 2025
Previous
Connecting Web Push to a Website
Next
Web Push SDK Methods
  • Importing Client Profiles When Subscribing to Web Push Notifications
  • Transferring Client Data When Importing a Profile via Push Channel
  • Updating Profile Data and Suspending Subscriptions
  • Web Push Subscription Creation and Update Events
© 2015 - 2026 Altcraft, LLC. All rights reserved.