<?php
$path = current_path();
if(in_array($path,['node/21','node/22','node/23'])): ?>
<script async src="https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'XX-XXXXXXXXX');
</script>
<?php endif; ?>