Installation and usage

This service relays HTTP requests from your subdomain to
Smartlook's recording domains, allowing you to bypass potential browser settings or extensions used by your visitors configured to limit data capture.



Only web recording is currently supported.

Environment variables

NameTypeDefault valueDescription
LOGGER_LEVELstring'info'One of trace, debug, info, warn, error, fatal, silent
MANAGER_HOSTstring''Smartlook Manager host
WEB_SDK_WRITER_HOSTstring''Smartlook Web Writer host
ASSETS_PROXY_HOSTstring''Smartlook Assets Proxy host

Installation and deployment

Image is available on Docker Hub.

  1. Run the image and configure environment variables according to your needs.
    All variables are optional, default values are listed in the table above.
docker run --name="smartlook-relay-proxy" -d \
  # can be also set with "--env-file"
  -e LOGGER_LEVEL=<level> \
  -e MANAGER_HOST=<host> \
  -e WEB_SDK_WRITER_HOST=<host> \
  -e ASSETS_PROXY_HOST=<host> \
  -p <port>:8000 \  # mapping is optional, internally runs on port 8000
  1. Create a new subdomain (e.g. and point it to the container.

  2. Replace URLs in Smartlook script (only next-gen tracking code is supported).

	window.smartlook ||
	  (function (d) {
	  var o = (smartlook = function () {
	  }), h = d.getElementsByTagName('head')[0];
	  var c = d.createElement('script');
	  o.api = new Array();
	  c.async = true;
	  c.crossOrigin = 'anonymous';
	  c.type = 'text/javascript';
	  c.charset = 'utf-8';
	  c.src = 'https://<your-relay-proxy-host>/recorder.js';
	smartlook('init', <project-key>, { host: '<your-relay-proxy-host>' });
  1. You're done! Visit your site and check the network tab to make sure the requests are sent through your subdomain.
    network tab screenshot


# See all available commands
make help

# Build and start development server (port 80 by default)
# Do not forget to configure environment variables in
make dev # add `build=yes` for rebuild