How do URL-Parameters work?

Mathias Freudendahl Updated by Mathias Freudendahl

You can break URLs down into different elements. Let's start with a simple example everybody knows:

https://www.google.com/

1.The Protocol

The protocol determines how your web browser should communicate with the webserver when fetching a web page. The most common used protocol is http which stands for 'HyperText Transfer Protocol' - http://

If we want an encrypted connection we use 'HyperText Transfer Protocol Secure' - in other words, https:// (notice the additional 's' added to the http).

2.The Domain name

A domain name is a unique reference that identifies a specific website on the internet. In this case: www.google.com. The domain name tells us which server is being contacted with the request.

URL Parameters

Now, Parameters are snippets of information found in the query string of a URL. An example could be adding a parameter to Google. Like this

https://www.google.com?q=facebook

We have added the parameter 'q' and set it equal 'Facebook'. The first parameter is always described with a question-mark (?) and then ParameterName=Value. In this case the ParameterName is 'q' and the value is 'Facebook'.

When we load the URL:

https://www.google.com?q=facebook

It tells Google to pre-populate the search field with the search-term 'Facebook'. You can give it try and see what happens.

Therefore, we can actually send information to the website about who we are, what to do, or whatever comes to mind, using URL parameters. We can also add second, third or fourth parameters by separating them with an ampersand-character (&), so they can be understood individually.

Example:

https://www.google.com?q=facebook&Type=SocialNetwork

With this example we are sending two parameters to Google when the page is requested:

q=facebook

Type=SocialNetwork

However, Google will ignore the second parameter since it isn't Google-approved. 'Type' is made up as an example.

In other words, we can ship any type of parameter to any website - but we can't force the website in question to process or save the parameter. So it is important to use only approved parameters and in an accepted format!

So the next time you see something like this:

www.MyURL.com/?utm_source=Newsletter10&utm_medium=Email ...

...it is actually someone using URL-parameters to send information into Google Analytics.

Google Analytics accepts parameters named utm_****

In this example, three parameters are being shipped to the website www.MyUrl.com/

utm_source=Newsletter10

utm_medium=Email

It tells Google Analytics to store information about the origin of any person clicking the link. For example, that they got the link from Newsletter10 and the medium used was 'email'. 

We use the same method when requesting tracking-pixels. We add t-codes to tell the system what project the impression data should be associated with (article: what is the purpose of a t-code?) and we use cache-buster parameters (article: what is a cache buster and why do we need it?)to ensure that each impression is logged.

How did we do?

How to add parameters to AudienceReport pixel

Contact