In this article, you’ll learn the following:
By implementing the VWO SmartCode on your website, you grant VWO access to track the visitors’ actions on your website. Through this, VWO collects the attributes of your visitors and their interactions with your web pages that are involved in the campaigns that you have created in VWO. These data will be directly sent to VWO’s visitor data server, where they are classified and stored. VWO uses these data for your analysis and report generation.
However, if you wish to take control over the data that is transferred to the VWO servers, you can opt for the reverse proxy methodology, which makes your server act as a middleware, placing it in between the data collector (your website) and the receiver (VWO). This actually makes the data collected from your website be sent to your server, where you can inspect the collected data before passing it over to the VWO server.
VWO, in general, classifies information and anonymizes any personally identifiable information (PII), such as email addresses, passwords, etc. Using the reverse proxy method, you will be able to restrict the flow of such information to the VWO server.
Pros of Reverse Proxy Methodology
The reverse proxy methodology primarily aims at routing the calls to your server from your website before reaching VWO. Besides this, the process also rewards you with the following benefits:
- The power to control and classify which type of data can be sent to the VWO servers.
- Restricting the transfer of any data that you regard critical or confidential.
- Obviating the trouble of VWO server calls being blocked by an ad blocker application.
Implementing Reverse Proxy
Implementing the reverse proxy setup is pretty straightforward. Once you have installed the VWO SmartCode into the <head> tag of your website’s source code, you just need to replace
https://dev.visualwebsiteoptimizer.com in the SmartCode in the following two ways:
Via an Independent Domain or a Subdomain
If your main domain is already loaded enough, you can choose to use a different domain or a subdomain to deploy the VWO SmartCode in it. This requires you to maintain both servers for your website.
Using this approach, you can create a subdomain under your main domain or a domain independent of the main domain and use it to replace the VWO server with it. For example, let’s say, you’ve created a subdomain, say, https://sub.mydomain.com, then in the SmartCode, you need to replace https://dev.visualwebsiteoptimizer.com with https://sub.mydomain.com. You can apply the same procedure for an independent domain, as well.
For the proxy setup at the server side for the subdomain / independent domain approach, follow this example:
Via the Main Domain (Path-Based)
If your main domain is capable of handling the load, you can use this method to deploy the VWO SmartCode in it. In this approach, you will have to include a separate route for VWO in the main domain. Let’s say your main domain is https://mydomain.com, then you need to replace https://dev.visualwebsiteoptimizer.com with https://mydomain.com/vwo.
For the proxy setup at the server side for the main domain (path-based) approach, follow this example: