Thanks for your patience on this. Can you please try the below:
add_filter( 'googlesitekit_tagmanager_tag_blocked', 'restrict_gtm_snippet');
function restrict_gtm_snippet(){
if ( is_page(2013)) {
return true;
}
return false;
}
The difference with the above, is that I referred to the tag manager module as tagmanager
as opposed to tag-manager
. It’s documented as tag-manager, although I was finding the same results as you. I’ll be performing some further checks on this, but please do try the above and let me know.
if it doesnt exist we need a new filter to disable all scripts.
please give this feedback to dev.
I will certainly pass this one. Thank you! While I can’t guarantee this will be something added to the plugin in the form of a filter or otherwise, feel free to keep an eye out on the plugins GitHub repository, or alternatively you can open your own GitHub issue for this, which the team can review.