Eulerian reverse proxy
A reverse proxy integration routes Eulerian calls through infrastructure run by your own teams.
You can use this configuration to meet security, architecture or cookie policy constraints on the domain.
It brings no gain in data quality compared with a standard integration through domain delegation. The reverse proxy principle and what it changes for collection are described in What is a Reverse Proxy implementation?.
Integration modes available
Two integration modes are possible:
| Mode | Principle | Key point |
|---|---|---|
| Dedicated path | A path on the main domain is dedicated to Eulerian, for example /collecte. | No new subdomain or extra SSL certificate to maintain. |
| Dedicated host | A subdomain is dedicated to Eulerian and points to proxy servers run by the client. | The proxy relays the calls to the target Eulerian platform. |
The following sections are for your technical team. You can pass them on as they stand: they give the tag to place and the proxy configuration, for NGINX and for Apache2.
Dedicated path mode
In dedicated path mode, a path on the site is reserved for Eulerian collection.
Example:
https://www.mon-site.fr/collecte

In this mode, the main JavaScript tag must include the dedicated path used for collection.
JavaScript tag template
Replace <COLLECT_PATH> with the path dedicated to Eulerian.
<script>
(function(p,a){
var s=window,v=document,e=s.location.hostname,i=(e||a).length,y=5381,k='script',o=v.createElement(k);
for(;i;){i-=1;y=(y*33)^e.charCodeAt(i)}y='_EA_'+(y>>>=0);
(function(e,a,s,y){s[a]=s[a]||function(){(s[y]=s[y]||[]).push(arguments);s[y].eah=e;};}(e,a,s,y));
i=new Date/1E7|0;o.ea=y;y=i%26;o.async=1;o.src='//'+e+p+'/'+String.fromCharCode(97+y,122-y,65+y)+(i%1E3)+'.js?2;1';
s=v.getElementsByTagName(k)[0];s.parentNode.insertBefore(o,s);})('/<COLLECT_PATH>','EA_push');
</script>
Example with the path eulerian
<script>
(function(p,a){
var s=window,v=document,e=s.location.hostname,i=(e||a).length,y=5381,k='script',o=v.createElement(k);
for(;i;){i-=1;y=(y*33)^e.charCodeAt(i)}y='_EA_'+(y>>>=0);
(function(e,a,s,y){s[a]=s[a]||function(){(s[y]=s[y]||[]).push(arguments);s[y].eah=e;};}(e,a,s,y));
i=new Date/1E7|0;o.ea=y;y=i%26;o.async=1;o.src='//'+e+p+'/'+String.fromCharCode(97+y,122-y,65+y)+(i%1E3)+'.js?2;1';
s=v.getElementsByTagName(k)[0];s.parentNode.insertBefore(o,s);})('/eulerian','EA_push');
</script>
Point to watch
The path used in the configuration must not exceed 10 characters, so as not to overload the headers.
Dedicated host mode with NGINX
In dedicated host mode, the JavaScript tag format does not change.
You can use the quick onboarding JavaScript tag with the subdomain allocated. This subdomain must point to your proxy server.
Two parameters must be replaced:
| Parameter | Description |
|---|---|
<COLLECT_PATH> | Path used by the proxy. |
<GRID_HOST_NAME> | Eulerian target provided, in the format XXX.eulerian.net. |
NGINX template
location ~ ^/<COLLECT_PATH>/(.*)$ {
access_log /var/log/nginx/proxy.log;
proxy_pass https://<GRID_HOST_NAME>/$1$is_args$args;
proxy_set_header X-Eulerian "p;1;$remote_addr;$http_host;/<COLLECT_PATH>";
proxy_set_header Upgrade-Insecure-Requests "";
proxy_http_version 1.1;
proxy_temp_file_write_size 64k;
proxy_connect_timeout 5s;
proxy_send_timeout 5s;
proxy_read_timeout 5s;
send_timeout 5s;
proxy_cache off;
proxy_redirect off;
proxy_ssl_verify off;
proxy_buffering on;
proxy_request_buffering on;
proxy_store off;
proxy_ssl_server_name on;
proxy_buffer_size 64k;
proxy_buffers 16 32k;
proxy_busy_buffers_size 64k;
proxy_ignore_headers X-Accel-Redirect X-Accel-Expires X-Accel-Limit-Rate X-Accel-Buffering X-Accel-Charset;
}
NGINX example with the path eulerian and the host test.eulerian.net
location ~ ^/eulerian/(.*)$ {
access_log /var/log/nginx/proxy.log;
proxy_pass https://test.eulerian.net/$1$is_args$args;
proxy_set_header X-Eulerian "p;1;$remote_addr;$http_host;/eulerian";
proxy_set_header Upgrade-Insecure-Requests "";
proxy_http_version 1.1;
proxy_temp_file_write_size 64k;
proxy_connect_timeout 5s;
proxy_send_timeout 5s;
proxy_read_timeout 5s;
send_timeout 5s;
proxy_cache off;
proxy_redirect off;
proxy_ssl_verify off;
proxy_buffering on;
proxy_request_buffering on;
proxy_store off;
proxy_ssl_server_name on;
proxy_buffer_size 64k;
proxy_buffers 16 32k;
proxy_busy_buffers_size 64k;
proxy_ignore_headers X-Accel-Redirect X-Accel-Expires X-Accel-Limit-Rate X-Accel-Buffering X-Accel-Charset;
}
Sizing
As a guide, for a volume of 1 billion hits a month, you need to allow for traffic of at least about 800 requests per second.
For this kind of volume, plan for:
- at least 2 to 3 NGINX servers;
- a configuration tuned to your traffic;
- possibly a
tcp_fin_timeoutsetting to free sockets faster; - a load balancing and failover mechanism.
Dedicated host mode with Apache2
The Eulerian target is provided in the format XXX.eulerian.net.
In the original example, the target used is:
foo.eulerian.net;
The example below also includes a mechanism that stops specific cookies from being passed on, with the keys bar, baz and qux.
Apache2 example
... HTTPS Virtualhost ...
# Activate Proxy
ProxyRequests On
SSLProxyEngine On
# For speed
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerExpire off
# To fine tune
ProxyPass / https://foo.eulerian.net/ connectiontimeout=10 timeout=10 retry=0
ProxyPassReverse / https://foo.eulerian.net/
ProxyAddHeaders off
# Eulerian header
RequestHeader unset X-forwarded-for
RequestHeader set X-Eulerian "p;1;%{REMOTE_ADDR}s"
# Drop specific cookies
RequestHeader edit* cookie "bar|baz|qux)=[^=;]*" ""
RequestHeader edit cookie "^[; ]*" ""
RequestHeader edit cookie "[; ]*$" ""
RequestHeader edit* cookie "; (; )*" "; "
Apache2 points to watch
- The path used must not exceed 10 characters.
- The target
foo.eulerian.netis an example: use the target provided by Eulerian. - The four
RequestHeader editdirectives in the “Drop specific cookies” block remove thebar,bazandquxcookies from the forwarded request. - The configuration must be adapted to your HTTPS environment.
Checking that collection works
After deployment, check that the Eulerian library is loaded through the proxy and that the following value is passed correctly:
?2;1
Key points
A Eulerian reverse proxy integration routes collection calls through infrastructure run by the client.
It can meet security, architecture or cookie policy constraints, but it does not improve data quality compared with a standard integration through domain delegation.
The choice between dedicated path and dedicated host depends mainly on your technical architecture, how you manage domains and certificates, and your infrastructure’s capacity to absorb collection traffic.
Points to keep in mind:
- The proxy is hosted and run within your infrastructure.
- This integration does not replace the Eulerian configuration: it acts as a relay to the Eulerian platform.
- Dedicated path mode avoids adding a subdomain or an extra SSL certificate.
- Dedicated host mode needs a dedicated subdomain pointing to your proxy servers.
- The configured path must stay short: 10 characters at most.
- The
<COLLECT_PATH>and<GRID_HOST_NAME>parameters must be replaced with the values that suit your configuration. - At high volumes, the proxy infrastructure must be sized with redundancy and failover.