how to check macros on confluence
Asked by Integral Ad Science:

What would be the best way to get the list of all the macros installed/running on a confluence instance?  
[](https://community.atlassian.com/t5/Confluence-questions/how-to-check-macros-on-confluence/qaq-p/397577?attachment-id=3545){#link_11867d8f01ac74}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/67271/1/image2016-8-18%2014%3A6%3A14.png){#display_11867d8f01ac74_0}  
[](https://community.atlassian.com/t5/Confluence-questions/how-to-check-macros-on-confluence/qaq-p/397577?attachment-id=3546){#link_11867d8f01ac74_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/67271/2/image2016-8-18%2014%3A3%3A45.png){#display_11867d8f01ac74_2}  
[](https://community.atlassian.com/t5/Confluence-questions/how-to-check-macros-on-confluence/qaq-p/397577?attachment-id=3547){#link_11867d8f01ac74_1}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/67271/3/Screen%20Shot%202016-08-18%20at%206.06.10%20PM.png){#display_11867d8f01ac74_4}  
[](https://community.atlassian.com/t5/Confluence-questions/how-to-check-macros-on-confluence/qaq-p/397577?attachment-id=3548){#link_11867d8f01ac74_2}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/67271/4/image2016-8-18%2014%3A5%3A48.png){#display_11867d8f01ac74_6}


Answers:
author: Integral Ad Science
body: Hi Davin,

I saw that you created that macro Milo was referring to and was hoping you can help. I took the code and created the macro\&new page but am now getting the same error message the a few others have gotten:

"ERROR GETTING COUNTS FOR MACRO:ACTIVITY STREAM"

Hope you can help. Thanks in advance.

comments: author: Davin Studer
body: First of all make sure you have copied it all correctly. If that still is not working then put this line ...

```
console.log('Macro report: ' + searchURL);
```

... in between these two lines and save the macro.

```
searchURL = AJS.params.baseUrl + '/rest/searchv3/1.0/search?where=${searchSpace}&amp;spaceSearch=true&amp;queryString=macroName:' + encodeURIComponent(macro.name);AJS.${d}.ajax(
```

Then go to your macro report page and open up the developer tools (F12 in Chrome and IE/Edge). You should see something like this in the developer tool's console.

**Chrome**

**image2016-8-18 14:6:14.png**

**IE/Edge**

**image2016-8-18 14:5:48.png**

Try copying and pasting one of the URLs into your browser's address bar. What result do you get from that?


author: Integral Ad Science
body: Thanks for your patience Davin. This is a little above my knowledge. I am on the developer's console and picture attached is what I got.

.Screen Shot 2016-08-18 at 6.06.10 PM.png


author: Davin Studer
body: Ahhh! Your Confluence instance is setup such that the base URL is <https://confluence-stage.303net.pvt/confluence> but you accessed the page using normal http not https. You need to use https otherwise the user macro will fail to run because of the same-origin-polcy when it comes to AJAX requests.


author: Davin Studer
body: And really if your system admins set up your confluence instance to use https they should make it such that you cannot access it with just http ... but that is another issue entirely.


author: Integral Ad Science
body: Thank you very much. That did the trick.


author: Integral Ad Science
body: [Thanks @Milo.](mailto:Thanks?@Milo.) Will take a look at that page.

@Davin. Thanks but we currently are on 5.7.4.


author: Davin Studer
body: Also, if you use 5.10 there is now a native report in Confluence Admin that can tell you your macro usage.


author: Milo Test
body: @Davin Studer has a pretty slick solution:

<https://answers.atlassian.com/questions/155280>...


Tags: confluence-administration