How to get extra data (using macros) to the index.html template?

I am wondering what is the best way to pass in data to the index.html template using a macro.
I can get a macro to run via the project.xml doing:
<haxeflag name="--macro" value="mcro.MyMacros.pageInfoMacro()" />
The problem there is I don’t know what the macro should be doing. Can it affect the Template.globals object for example?

It also seems that Haxe templates have some ability to run macros directly but I’m not sure how to pass a callback function within the OpenFL environment.

Any help is much appreciated, as I am stumped right now!

<set name="DATA" value="800"/>
<define name="DATA2" value="802"/>
      window.dataValue = ::SET_DATA::;
      window.dataValue2 = ::DEFINE_DATA2::;

Through the template, the value can be passed to SET_DATA.
Final result:

      window.dataValue = 800;
      window.dataValue2 = 802;

Thanks but I need to use a macro. I also need to generate an array.