Where should the data layer object be placed in the website code?

(A) Before‚Äč the container snippet

(B) After the container snippet

(C) Inside the container snippet

(D) At the bottom of your HTML

Explanation

The Data Layer object should be placed in the <head> section of the HTML code of your web page before the Container Snippet. The format is shown below.

<script>
  dataLayer = [];
</script>

Conclusion

This question is a part of the Assessment 2 section of the Google Tag Manager Fundamentals exam. You can find all the answers to this exam in our Google Tag Manager Fundamentals Assessment Answers page.

Leave a Comment

Share via
Copy link
Powered by Social Snap