XF 2.1 Count macro calls

Idhae

Active member
Hi,
does it make sense to create a code event listener templater_macro_post_render for each macro that i want to track on "viewCount"? or have someone an idea where i can hook into, to check all macros with only a single code event listener?

greetings
 
Update:
i have changed the code event listener to templater_template_post_render on PAGE_CONTAINER and check with preg_match_all $output the inserted code from the macros which i want to track the views of.
In the Listener i call my logView function in the repository, i did this like xenforo did, logThreadView function (Memory table).

What do you think, is this a good idea?
 
Back
Top Bottom