Where should I put data layer for checkout page | Community
Skip to main content
November 2, 2017
Solved

Where should I put data layer for checkout page

  • November 2, 2017
  • 1 reply
  • 958 views

Hi,

I need to implement analytics for a checkout page and i need the product name to populate in analytics. That being said i need a database call to retrieve the product name.

So my question is, what should be the sequence to put the datalayer object, DTM embedded code and piece of code i want to retrieve info from database.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by abhijmis

Hi,

The DTM Embed code (Header code) needs to be placed in the 'head' section and the footer code needs to be placed right before the 'body' tag ends.

Thus, it's recommended that the data layer is called and populated before the DTM code is referenced. However, typically data layer implementation is subject to your environment.

1 reply

abhijmisAdobe EmployeeAccepted solution
Adobe Employee
November 10, 2017

Hi,

The DTM Embed code (Header code) needs to be placed in the 'head' section and the footer code needs to be placed right before the 'body' tag ends.

Thus, it's recommended that the data layer is called and populated before the DTM code is referenced. However, typically data layer implementation is subject to your environment.