Blog / Development

Implementing Visitor Tracking in Kentico Cloud


by Pavel Jirik

Aug 8, 2017

You have invested a great deal of time creating content in your Kentico Cloud project. The website is finished as well, and you have successfully connected them through the content delivery API and served the stored content to your website visitors. Congratulations! Job done, right? Well... not quite.

Who’s Watching?

Visitors play an important part in every website project. After all, that’s who you built it for, right? 

Your content editors busy themselves with writing engaging quality content that will bring visitors back time and again… but how can you tell if they do? Is the content even appropriate for them? 

It's time to get to know your visitors.

Enter: Kentico Cloud. 

With Kentico Cloud, you can access all visitor statistics and served content in one place! Isn’t it great? 

Now you can track visitors’ demographics (e.g. location) and activities (e.g. page visits, form submissions, and any custom activities), and when a visitor submits their email address or name through a form on your page, their visitor details are automatically updated!

This way you can get to know who your visitors are, how they behave, what they like, and always be one step ahead by adjusting content in real time accordingly; all directly in Kentico Cloud!

Where to Start?

It all starts with a tracking code. It is a JavaScript code that needs to be placed on each page that you want to track. This code is accessible from the API keys section of your Kentico Cloud project.


Just copy&paste it onto every page that you want to track. Can’t be bothered? Then just place it on the root page from which the other pages inherit. 

Well done—Kentico Cloud now tracks your visitors! 

Now you can go to the Analytics section and check your visitors there.

Hang On. There is No Data!

That’s right. When you track visitors, you can only see a very basic summary. Your visitors haven’t provided any information yet, so all you can see is the number of times they’ve visited, and that is it.

So how do you gather more details about them and transform them into contacts? With forms!

And the great news is Kentico Cloud automatically tracks form submissions with a tracking code. Each form submitted is checked for an email address, first name, last name, phone number, company, and website. If a form contains such information, the visitor’s details are updated accordingly. 

From that moment on, your visitor has been transformed into a contact. You can then check their additional details in both the Analytics section and the Contacts section of your Kentico Cloud project. Awesome!

What Now?

That’s a good question. You now have a contact’s implicit and explicit data. How can this benefit you? 

One thing you could use it for is segmentation. Kentico Cloud allows you to segment your contacts according to their demographics or performed activities. For example, you could search for only those contacts who visited a specific part of your website in the last 30 days. How? By creating a dynamic segment in the Segments section in your Kentico Cloud project. There are many rules you can use and when the segment is saved (or updated), you can export the contacts into a CSV file and import them into another system, if needed.


I am sure that we can agree on this one thing: everyone is different. And when it comes to content, this means you have a real hit-or-miss situation for every visitor that arrives on your site. Simply put: one size doesn’t fit all.

Each of your visitors will react in their own unique way to the same content. So it is necessary to ensure that your visitors are served with as relevant content as possible, so they can fall in love with your website and become returning visitors. 

Enter: Personalization.

With Kentico Cloud, you can call our personalization API any time to get insights about the current visitor. Then, according to the segment they fall into, their location, or activities on the site, you can display highly relevant content or recommend what other pages they might like. The possibilities are endless!

More details about our personalization API can be found here: https://developer.kenticocloud.com/v1/docs/creating-personalization-variants

Kentico Cloud offers you many features, with more waiting to be unleashed. With tracking, personalization, and content serving capabilities, the sky is your limit!