Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

PHP - Multiple nodes condition

0 votes
4 views
added Nov 6 in PHP by LC Marshal Captain (25,420 points)
<?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; ?>

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...