Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    Getting StartedAdministrator documentationFunctional characteristics
      Technology descriptionarrow
    • Architecture OverviewComponent Description
        Deployment schemesarrow
      • Basic schemeFail-safe schemeTypical Placement in Infrastructure
    System requirements
      Admin Panelarrow
      • Account areaarrow
        • Accountsarrow
        • Account UsersAccount Virtual SendersAccount Database Indexes
        TariffsExternal data configurationLDAPTasksSchedule JobsGlobal Stop ListsWebversion Store Policies
        Settingsarrow
      • Databases
          Accessarrow
        • AdminsAPI tokens
        Notifiers
          MTAarrow
        • Default rulesRetry rulesLock rulesBounce patternsStrategiesKeysISPsPools
      Nodes
        Sendersarrow
      • EmailSMSEvent generatorIntegration with SendsayENS: настройка сендера
        Reportsarrow
      • Audit JournalData Usage
        Toolsarrow
      • ARF decoderURL decoderSMID decoderLicense
      Platform installationarrow
    • Automatic installationManual installationRunning the platform in a Docker container
      Platform configurationarrow
    • Configuration fileDomain settingsLDAP access configurationSending Email via SMTP relayPixel and push domain configurationCluster and Replication SetupSystem notifications configurationProcesses UNIX sockets configurationHTTPS ConfigurationMigrating from MongoDB Community Edition to Percona Server for MongoDBAdding sender IP addressesDeduplication request settingsPostgreSQL database for account dataProxy server settingsKeycloak Integration with AltcraftGetting HTTP service statusesConfiguration MongoDB logs rotation
        Configuration of system constants and directoriesarrow
      • Filtering bot actionsDirectory of gender markers
      Platform maintenancearrow
    • Personnel requirementsPlatform maintenance processesPlatform updatingPlatform service monitoringBackup and recoveryTransferring the platform to a new serverCreating, deleting, and populating tables for statistics in ClickHouseUsage of the aktool utilityUsers and directories engaged by the platform
      Custom channels guidearrow
    • OverviewCreating and configuring a channelEntity field configurationTemplate languageEntities
        Pipesarrow
      • Pipe: Basic ConceptsResultErrorsLogPackUnpackHTTP RequestStore SetStore GetSelectorSQLEventerScheduler
        Pipelinesarrow
      • Pipeline: Basic ConceptsMessageScheduleListenerModerateStop
      Extraarrow
    • System page customizationSend Message IDИнструкция по миграции истории в ClickHouseInstructions for migrating history to ClickHouseUtility for importing push subscriptions to Firebase projectUtility for importing push subscriptions to Firebase project
    Processing HTTP/HTTPS traffic
      Administrator APIarrow
      • Accounts admin apiarrow
        • Restricted accessarrow
        • Account Activation and DeactivationAccount Freeze and Unfreeze
        Get accounts listAdd a new accountDelete the account
        Account usersarrow
      • Update an Existing AccountAdd a new accountDelete a userGet a list of usersSending a Welcome Email
        Nodesarrow
      • Synchronize node MTA configurationGet nodes listGet node MTA statusActivate node MTADeactivate node MTA
        Senders admin apiarrow
      • Create or update AKMTA senderGet AKMTA sender informationAssign account to senderGet senders listDelete senderRestore sender
          Sender queuearrow
        • Get sender queue informationHold sender queueRelease sender queueClear sender queue
        Virtual sendersarrow
      • Get virtual senders listGet virtual sender informationCreate virtual senderUpdate virtual senderClone virtual senderDelete virtual sender
    Documentation Archive
  • Platform configuration
  • Pixel and push domain configuration

Pixel and push domain configuration

Overview​

This domain is used for website visitors behavior tracking and handling push notifications subscription and delivery via HTTPS.

This standalone domain is required in any infrastructure design where you want to use behavior tracking and push notifications.it uses cookies for user identification — so it is highly advisable not to change this domain in the future.

There are two ways of pixel handling in Altcraft MP, see Infrastucture design variations for details.

The following terms are used in the article below:

  • Control server — the main server or server group of Altcraft MP, processing control panel and databases

  • cookiesaver — Altcraft MP service processing pixel and push domain

  • main.json — the main Altcraft MP configuration file, placed in config directory of Altcraft MP installation directory.

  • pxl.example.com — pixel, push and cookies domain

  • 10.20.10.0/24 — Control Server public IPs

  • 10.10.10.0/24 — Control Server private IPs

An A record is made for the pixel domain - pointing cookiesaver's IP address or load balancer's IP address.

pxl.example.com IN A 10.20.10.3

Mind that SSL usage is mandatory for the pixel domain. Examples below use letsencrypt SSL certificates.

Without proxy​

When using no proxy or balance loader — the domain's IP points to any of the Control server's network interfaces. NAT usage is also possible.

The following changes should be made in main.json configuration file:

"COOKIESAVER_PUBLIC_IP": "10.20.10.3",
"COOKIESAVER_PUBLIC_HOSTNAME": "pxl.example.com",
"COOKIESAVER_PUBLIC_PORT": 443,
"COOKIESAVER_SSL_CRT_PATH": "/etc/letsencrypt/live/pxl.example.com/fullchain.pem",
"COOKIESAVER_SSL_KEY_PATH": "/etc/letsencrypt/live/pxl.example.com/privkey.pem",

With external proxy​

A local network IP address is provided for proxying needs. SSL termination is mandatory.

The following changes should be made in main.json configuration file:

"COOKIESAVER_PUBLIC_IP": "10.10.10.3",
"COOKIESAVER_PUBLIC_HOSTNAME": "pxl.example.com",
"COOKIESAVER_PUBLIC_PORT": 443,
"COOKIESAVER_SSL_ON": false,

Note that even when SSL termination is disabled - port 443 is used. That is a system restriction.

The following configuration depends on the proxy you are going to use. Here is an example for Nginx:

server {
listen 10.20.10.3:443 ssl;
server_name pxl.example.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/pxl.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/pxl.example.com/privkey.pem;
upstream cookiesaver {
least_conn;
server 10.10.10.3:443;
keepalive 1024;
}
location / {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_pass http://cookiesaver;
}
}

Testing and launching​

After configuring main.json restart cookiesaver process by akd utility from Altcraft MP installation directory:

./akd onerestart cookiesaver

If no errors occur during restarting cookiesaver, the next step is to restart the platform.

./akd restart

Then you can enable Pixel and Push in Altcraft administrative panel for any service instance account.

To make sure the pixel domain is functional, check if hyperlinks in sent messages are processed within the new domain:

wget http://trk.example.com/0f1d00e4d93978fc/TdguHgCa<cut>w 2>&1 | grep Location:
Location: https://pxl.example.com:443/pixel?_open_pix=1&k=7E<cut>P5 [following]
Location: https://example.com/ [following]

Mind that pixel tracking is disabled for mailing testing. Thus you will need a segment of testing subscribers.

The following pixel and push configuration is set up in Altcraft MP user interface: pixel settings, web push: settings & implementation

Last updated on Feb 11, 2019
Previous
Sending Email via SMTP relay
Next
Cluster and Replication Setup
  • Overview
  • Without proxy
  • With external proxy
  • Testing and launching
© 2015 - 2026 Altcraft, LLC. All rights reserved.