Traffic Routing on Addue #2: Routing website traffic by referer, user agent, or language
Note: This post is an introductory tutorial to Addue (https://Addue.com). Addue is an all-in-one marketing toolkit featuring tools such as conversion tracking, A/B split testing, traffic routing by geography and other browser data, link cloaking and more. For more information, please see the Addue website.
Note 2: Links and linksets used to be called rules and rulesets. The images in this post still refer to them as rules and rulesets but the software has been updated.
Getting Started: Links And Linksets
Traffic Routing 1: Route by country based on IP address lookup
Besides routing based on IP address and country lookups using the CR country routing link, it’s possible to route traffic in other ways using Addue. Addue provides 3 other link types for this purpose. Here they are with their 2 letter Addue codes:
- LA – Language Routing Link – Route traffic according to user language field
- RF – Referer Routing Link – Route traffic according to referer field
- UA – User Agent Routing Link – Route traffic according to user agent field
These three links work similarly. They look at information passed along by the visitor’s web browser and use that to make a decision on where to route it.
The referer routing link works based on the referer set by the visitor’s web browser. When traffic to your website comes in from another websites, the visitor’s web browser often (but not always) passes along the URL of the website that referred it. This information can be accessed and used to make a determination on where to send the traffic. It is not however always available – sometimes the visitor’s web browser will leave it blank. So it can’t always be relied upon. It is important to always use a DR default routing link in conjunction with RF referer routing links to tell Addue what to do with traffic that doesn’t fall under any of the RF links available.
Let’s walk through an example using the RF link type before talking about the LA and UA link types.
Insert a new link selecting the RF link type. Set up the link as in the form below:
Give the link linkset ID “tutorial3” as in the form. The destination URL is where the traffic will be sent if the conditions of the link are met. We’ll set that to a landing page on our favorite fake domain, http://jollyniceflowers.com/page1.
The Search String field is what defines the link. This is the phrase that Addue will look for in the referer URL passed along by the visitor’s web browser. As you can see we’ve set this to “facebook.com”. If Addue.com detects this phrase in the referer URL, it will send the visitor’s click to http://jollyniceflowers.com/page1.
Search string matches are always case-insensitive. It doesn’t matter whether you enter Facebook.com or facebook.com – either would match a referer containing facebook.com, or a referer set to Facebook.com.
Put in a couple more RF links in this tutorial3 linkset. Enter a similar link with destination URL http://jollyniceflowers.com/page2 and search string “twitter.com” and another with destination URL http://jollyniceflowers.com/page3 and search string “google.com”.
Finally put in a default link (DR type) with the same linkset ID (“tutorial3”) to send all other traffic to destination URL http://jollyniceflowers.com.
When you look at your linkset in under the List/Edit/Delete links section, you should now have something like the following:
The link has now been set up as desired. When traffic comes in, Addue will look at the referer data. If it sees “facebook.com” in the referer data, it will send the traffic to http://jollyniceflowers.com/page1. If it sees “twitter.com”, it will send it to http://jollyniceflowers.com/page2 and http://jollyniceflowers.com/page3 if it sees “google.com”. All other traffic will be sent to http://jollyniceflowers.com by the DR default routing link.
To invoke this link, use the Addue link provided in the linkset listing page:
If you click that link, you’ll see that Addue figured out the click wasn’t coming from facebook.com, twitter.com, or google.com and correctly used the DR link to route it, sending it to http://jollyniceflowers.com
The UA user agent link and LA user agent link work similarly to the RF link. They look at the user agent data and browser language data respectively instead of the referer data.
The user agent data is a string similar to this one that browsers usually pass along:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
This contains information about the kind of web browser (Firefox in this example) that is being used. If you use this link type and set up a link with “Firefox” in the search string, all visitors that have Firefox identified in the search string will be routed to the destination URL specified in your link. As with the RF link type (and the LA link type), UA link types do not consider case when matching search strings to browser data. “firefox” would also match the example given.
The LA link type looks at the language field passed along by the browser (technically known as the Accept-Language header) to see if the search string specified matches any part of it. The language field is something like the following example:
The first part of this header specifies that the preferred browser language is US english – en stands for English and US stands for the United States domain. You could set up a search string as “en-US” to look for this in the language header.
Feel free to experiment with the UA and LA link types by setting up some links using either.
You can actually mix CR, UA, LA, and RF links in the same linkset. Addue will go through all the links you have available to try to find a link it can use to route the traffic. The order in which it applies the links is CR – RF – LA – UA. In other words, it will first try to find a CR link which applies, then look at any RF links present, then LA, then UA links. One way you could use this feature for example is to route traffic by country using CR links, falling back to LA browser language links to try to route based on browser language if the CR links couldn’t identify the country for any reason.
You should always include a DR default routing link with linksets containing CR, UA, LA, or RF links. If none of the links you provide match the incoming traffic, the DR link’s destination URL is where Addue will send it.
And that wraps it up for this tutorial; as always if you have any questions please feel free to drop us a line.