What is a Reverse Proxy implementation?



Context

Eulerian collects behavioral data to power decision-making marketing solutions for the Acquisition and Analytics functions of B2C and B2B companies.

Historically, marketing and advertising industry players have collected behavioral data via a web SDK (also called a Javascript Tag) that sends collection requests from the user's browser. This is called "client-side" tracking.

With the rise of ad blockers and technical restrictions related to privacy issues, the third-party cookie used by many industry players is set to disappear by September 2024, with a strongly negative impact expected on the quality and quantity of available data.

Already today, ad blockers and privacy plugins can intercept requests sent by an analytics solution and prevent them from reaching its (the analytics solution's) servers.

Since 2006, Eulerian has operated an entirely first-party collection and is not impacted by the announced disappearance of third-party cookies. However, a Reverse Proxy implementation allows an Eulerian client to optimize the quality of behavioral data collection, particularly with regard to a first-party collection context increasingly challenged by Apple on its operating systems (iOS in particular) and on its browser (Safari).

With a Reverse Proxy, you can route collection requests through your own domain (mysite(.)com) and ensure that they are sent transparently and efficiently to your Eulerian platform.


What is a Reverse Proxy?

A Reverse Proxy is a solution installed, deployed and maintained by the Eulerian client's IT team, directly in its technical infrastructure.

Technically, it is a server that acts as an intermediary between a user's browser and a web server.

When a user's navigation on your site mysite(.)com generates requests to an Eulerian server, these requests are intercepted by the Reverse Proxy, which routes them to another backend server (yours), before transferring them to the Eulerian server.

Before transmitting them, the Reverse Proxy therefore acts as a gateway, collecting requests made to a specific address on your domain (mysite(.)com/collecte), then transferring them to another domain (eulerian(.)com).

Once the appropriate server receives and processes these requests, it sends the response back to the reverse proxy, which then forwards it to the user.



Why use a Reverse Proxy?

A reverse proxy offers several advantages:

Ensure accurate data collection

For the portion of your traffic that uses ad blockers or privacy plugins, requests to Eulerian servers may occasionally be intercepted and the lifetime of the first-party identifier may be limited.

Using a Reverse Proxy ensures that you can bypass limitations and ensure quality and sustainable data collection.


Control over web traffic

A Reverse Proxy also allows you to exercise more precise control over the communication between your website and our applications and services.


Link to source browser

By deploying a Reverse Proxy and unlike a fully server-side solution, Eulerian can still interact with the client browser and the application of your client-side site.

This allows you to keep the best of both worlds by avoiding cutting yourself off from existing functionalities enabling certain business use cases, including, for example, the exchange of data with personalization tools (A/B testing).

To summarize, you can optimize your existing setup by setting up an advanced tracking setup where you capture analytics data on your own domain and then push it to Eulerian.

Tag Example

<script type="text/javascript">
(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);})('/collection','EA_push');
</script>
In this example, if we consider that your site's URL is  https://www.my-site.fr , then since you specified /collection as the URI, all calls from the solution will be sent to:  https://www.my-site.fr/collection 


NGINX configuration example

location ~ ^/<COLLECT_PATH>/(.*)$ {
access_log /var/log/nginx/proxy.log;
proxy_pass https://<COLLECT_DOMAIN>/$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;

# avoid 504 gateway timeout
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;
}
Using the example above:
  • URI: /collection
  • Collection domain:  client.eulerian.net 
location ~ ^/collection/(.*)$ {
access_log /var/log/nginx/proxy.log;
proxy_pass https://client.eulerian.net/$1$is_args$args;

proxy_set_header X-Eulerian "p;1;$remote_addr;$http_host;/collection";
proxy_set_header Upgrade-Insecure-Requests "";

proxy_http_version 1.1;

# avoid 504 gateway timeout
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;
}

Configuration for post-impression measurement


If you want to measure impressions and post-impression impact, you need to ensure that the proxy you have set up can handle the associated volumes. If you do not want the proxy to process it, it is possible to create a domain delegation so that Eulerian can track impressions on its own infrastructure.

To do this, it is absolutely necessary to be authorized to set cookies at the domain level. Using the example of the website  https://www.my-site.fr , which has a proxy declared on the URI /collect, the website operator can create a collection subdomain, for example  https://elr-imp.my-site.fr , which will be aliased via a CNAME command on the collection infrastructure.

The pixels will use the subdomain  https://elr-imp.my-site.fr  to set cookies on the domain .my-site.fr once the user arrives at the domain  https://www.my-site.fr .
WARNING : be sure your proxy for post-impression measurement can withstand the volume of traffic that is going to be sent to it !