Add observer for macros