Yes. You just have to find the function provided by the plugin that will tell you if the user has accepted cookies – I don’t know what it is off-hand, but it is hidden somewhere in the documentation. And, depending on the number of different pages, you might want to use use something other than if {}
Also, you need to hook into something that wordpress knows about so that you code gets executed in the right place. Something like:
add_action('wp_head', 'my_cookie_function', 1);
function my_cookie_function() {
if user_has_accepted_cookies {
if page_id = 'x' {
Write cookie/pixel code here
}
}
}
You will find the documentation for the actions into which you can hook here: https://codex.www.ads-software.com/Plugin_API/Action_Reference . That would be wp_head in the example above.
To get the page id, I guess you would use something like get_the_id() (see https://developer.www.ads-software.com/reference/functions/get_the_id/ )
You might also want to consider the action wp_enqueue_script(), which is used to queue up a javascript for execution.
I’m not a web developer either, so I am a little out of my depths here. But as no one better qualified than I has stepped in, I have given what help I can.