Log for IP Address and Country of Unique Visitors

I am a new user of Pro Cloudflare, and I have historically used the WordPress plugin to provide a short term log file to identify hackers through their IP address and country of origin. I was told that this information is available in Cloudflare log files, which I have not yet located in the GUI. I would like to know if the Analytics -> Web Traffic -> Unique Visitors page has an associated log file I can review to see the IP addresses and countries for visitors for this purpose. Does anyone know how to access this data in the Cloudflare GUI?

Thanks in advance,


Cloudflare logs are only available on Enterprise Plans. Or you can use https://logflare.app

Thanks for the help, so let’s see how difficult this is to start logging visitors.

On a scale of 1 to 10 how difficult was it?

1 Like

Starting Logflare is relatively simple, but I only want to log Unique Visitors, which I did not yet figure out how to do. This requires additional work to determine if this subset of data can be logged, as opposed to the mountain of data that is available from Logflare.

We could hash together a few fields. Without cookies it’s not the best but probably a decent enough proxy.

You could actually use Data Studio to concat like IP and user agent and make a graph of a unique count of that field.

Or if your site is setting cookies you could put something in the response header. Or if they’re logged in a user ID or something.

Historically, I used the WordPress plugin entitled " Visitor Traffic Real-Time Statistics Pro" for this purpose, but it uses the database constantly to store data for visitors, so it slows the website down appreciably. The data collected is available in the WordPress Dashboard in real-time, so you can always see who is visiting your website, and this is important when clusters of visitors originate from a single country over a period of time. The last attack was in 72-hour intervals spread over 3-weeks by trying to access files that are not available to visitors. This concerted effort resulted in the IP address being blocked, and finally, the country was blocked in Cloudflare since I have never done business in that country.

Regardless, the data displayed by " Visitor Traffic Real-Time Statistics Pro" was seen in the following format:

IP Address Location Time United States, Salt Lake City, Utah 09 Jul 2020 @ 09:12 am Canada, Vancouver, British Columbia 09 Jul 2020 @ 08:46 am

As you can see, the data can be sorted by IP Address, Country, City, State, and Date, and " Visitor Traffic Real-Time Statistics Pro" always provided a continuous count of the daily visitors from any country to permit hacking attacks to be identified.

This data is available in Cloudflare on the Analytics -> Web Traffic -> Unique Visitors, but Cloudflare only provides an abbreviated list of Countries for Unique Visitors that does not provide data for identifying the country of every visitor, nor the IP address of Unique Visitors. I was told that the Logflare App in Cloudflare could be used to log this data the same as was done in " Visitor Traffic Real-Time Statistics Pro", but I have not yet figured out how to do this type of log.

Therefore, is it possible to only log this data in Logflare? If not, then how can this log be created in Cloudflare?

Thanks in advance,


Give me a screenshot of the report you want and I’ll build you a Google Data Studio report so you can use it with your Logflare data.

Here is an example report powered by Logflare > https://datastudio.google.com/s/pKMWyqEWiTA

1 Like

Here is the Cloudflare Analytics data we will be working with, which is specifically for Unique Visitors:

If the Datastudio GUI can provide a line graph as shown for the number of Unique Visitors in a given period of time, such as 1-day, 1-week, 30-days. etc. Cana World Map be included to show the countries of visitors also for this time period? The table showing the number of visitors from each country for this time period is also important, as long as the list is complete and not shortened as shown here.

Finally, a data table showing the IP Address, Country/State/City, and the date and time of the visit is important as shown in the table created in Visitors Real-Time Statistics Pro:

Will you need access to my Cloudflare, Logflare, and GSuite accounts to do any of this work?



As I look through your data, I see repeat visitors who come back three (or more) months later.

What it sounds like you want is one huge data file, and then a way to select from time periods, such as last: 24 hours/7 days/30 days (Current time minus x).

And then what? Filter out duplicates so you get a unique visitor count? Or look for duplicates, then generate a report sorted by most visits by IP address?

Cloudflare doesn’t even do this for Enterprise customers. They’ll give you the log files, and then you have to push them off to a third party service.

But @chasers seems to love data and might know of a way to generate such reports…again, through a third party service.