Skip to content

Commit

Permalink
Adding in rest of tag manager code.
Browse files Browse the repository at this point in the history
  • Loading branch information
calebfavor committed Aug 30, 2017
1 parent 33442c2 commit 716f779
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/TrackingProviders/GoogleTagManagerTrackingProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ public static function headTop()

return
"
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','" . $trackingId . "');</script>
<!-- End Google Tag Manager -->
"
. self::$headTop;
}
Expand Down

0 comments on commit 716f779

Please sign in to comment.