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

JavaScript using the HTML macro returns nothing

Good morning,


I am very new to JavaScript, but am trying to get a private page to display as a widget on a Confluence page. Confluence is a core tool for our department, and so there is great benefit to having the Statuspage feed displaying on pages for various team spaces.


I have created a new page new page on my personal space, interted the HTML macro, and then inserted the following code;


<script type="text/javascript" src=""></script>
	var sp = new{ page : 'XXXXXXXXXXpx', apiKey : 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' });
 		success : function(data) {


The publishes fine, but the macro returns no data from


I know I must be missing something obvious, but need a bit of guidance please. I have read the support document for using the HTML macro, but didn't get further with it, so any advice is greatly appreciated.




2 answers

1 accepted

It's too late for javascript to execute in the body of a macro - the <head> section of the code is effectively ignored because the <head> of the page has already been completed before the body of the page starts.

Best practice is to store Javascript towards the end (before the end body tag).

However, if the Statuspage is in trial mode, the widget won't work - this happened to me several times (I manage multiple pages for Symantec). Admittedly haven't tried to embed it into a Confluence page though.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

2019: All Wrap(ped) Up Like a Present

Hindsight might be 2020 but looking back, a lot of cool new features rolled out in 2019. From new collaboration and organizational powers to fresh templates and handy integrations, it’s been quite th...

50,419 views 90 97
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