MainAero/yii2-gtm-widget

View on GitHub
src/widget/views/dataLayerPush.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php use yii\helpers\Json; ?>
<script>
<?php foreach ($dataLayerPushItems as $item) : ?>
  dataLayer.push(<?= Json::encode($item) ?>);
<?php endforeach; ?>
</script>