Number of anonymous users per week

Would Data Explorer be able to help me find the number of anonymous users by week?

The easiest way to get data about anonymous users is to click the “Reports” link from your site’s admin dashboard to get to your Dashboard Reports page. Enter “anonymous” into that pages search box to get to the Anonymous page views report. That report allows you to filter for a given time period. It will return data for each day in the report period. The “Totals for sample” row at the bottom of the report will tell you the total number of anonymous page views for the period.

Note that the Anonymous report returns the number of anonymous page views for a given time period, it doesn’t return the number of unique anonymous users who have visited the site. To get the number of unique anonymous users who have visited the site over a given time period, you will need to use a Data Explorer query. Something like this should work:

--[params]
-- date :start_date
-- date :end_date

SELECT 
COUNT(DISTINCT ip_address)
FROM topic_views
WHERE viewed_at BETWEEN :start_date AND :end_date
AND user_id IS NULL

That query requires you to enter values for the start_date and end_date parameters before running it. Dates should be in the form yyyy-mm-dd. For example 2021-04-27

3 Likes