It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Number of pages created per user in Confluence

Armon Tiongco Mar 03, 2014

Hello,

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

Thanks,

Armon

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

Martin Jul 19, 2016

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

Chhaya Gadade Apr 02, 2019 • edited

Where should we run this SQL query.

0 votes
Matthew J. Horn Mar 03, 2014

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:

https://confluence.atlassian.com/display/DOC/Writing+User+Macros

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.

hth,

matt

Armon Tiongco Mar 03, 2014

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?

Thanks,

Armon

Martin Apr 02, 2019

That depends.

If using a database such as MySQL, you could use a tool such as MySQL Workbench to pull stats from the database. 

This method won't work if using Confluence Cloud.

0 votes
Martrice Denson Jun 19, 2014

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?

0 votes
Chase Seibert Feb 08, 2018

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

https://github.com/chase-seibert/confluence-stats

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

920 views 7 17
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you