Number of pages created per user in Confluence


Is it possible to determine the total number of pages a user has created in Confluence for a particular space?



4 answers

There are SQL queries that can be modified to do this. statistics.txt from Site Statistics or some of the other information. For you specific request, look for this query:

select concat('[~', creator, ']') as "User", count(distinct CONTENT.title) as "Pages created" 
    from CONTENT 
    where creator IS NOT NULL 
    group by creator 
    order by "Pages created" desc

This is exactly what I needed. Is there a way of being able to show the actual username or name of the person?

You can write a user macro to do this. I think the easiest way to approach the algorithm would be to iterate over each page and increment each user's count when you find a match for creator. User macros are great for this sort of one-off or highly configurable task.

If you've never written a user macro, start here:

If we're talking 10s of thousands of pages, though, you'll want to use the SQL plugin and do a database query. Search the plugin exchange for that.



Hello Matt,

Thank you for always taking your time to answer my question.

Yes - i was able to create simple user macros but nothing complicated yet.

Would you happen to have samples which covers the same idea?



I am trying to create a page that a user can come to and see only the pages that they have created. It looks like this script is close to what I need. Can you advise me on how I would add that script to a page. I have a template that the sales team will be creating pages, if they need to edit there page I want to create a page that will only show them conten that they have created. Would what you have above suit my needs?

If you only have API access, I wrote some code here to tabulate pages and edits by user.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

472 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you