ConsentFriend uncached context settings

Hi,
I’m using ConsentFriend for Google Tag Manager but I’d like to use a different GTM-id per context (because they are different urls). It’s possible to use context settings in the code section, but only cached.
[[++gtm-id]] returns the GTM id, but only the one from the web context
[[!++gtm-id]] returns [[!++gtm-id]] in the front-end, so it isn’t processed.

Any thoughts on how to fix this?
Tnx, Steffan

Please make sure that the consentFriend plugin runs after the context switching plugin, then the context setting is set right for ConsentFriend. There are a few Extras (‘LangRouter’, ‘XRouting’, ‘ContextRouter’, ‘ContextGateway’, ‘ClientConfig’) handled by the installation routine. So you maybe use a different routing plugin.

Is there a way to change the execution order? Both plugins (CF and Gateway) run at ‘OnHandleRequest’. Can I execute the CF plugin inside the Gateway plugin?

Please take a look into this: FAQ - modmore documentation

I found the execution order in the modx_site_plugin_events table and it seems to be working ok now. Thanks for the help!