Add header and footer code
Because Dynamic Tag Management includes a snippet of code in both your header and footer, you can run rules at the beginning or end of a page. This ability allows you to implement testing tools and other technologies while retaining control over tracking your pages.
Dynamic Tag Management creates staging and production embed codes you can use to test your changes in your staging environment before pushing changes to your production environment.
For a successful implementation, it is critical that you follow these instructions as they appear in Adobe Help. Specifically, you must place the header code in the <head> section of your document templates. Also, you must place the footer code just before the closing </body> tag. Placing either of these embed codes elsewhere in your markup, or using asynchronous methods to append the embed codes, or wrapping the embed codes in any way, are not a supported implementations of Dynamic Tag Management. The embed codes must be implemented exactly as provided.
An unsupported implementation will yield unexpected results and prevent Customer Care and Engineering from assisting with your implementation.
- In the Dynamic Tag Management interface, open the Embed tab and select your hosting option (such as Akamai), then toggle the switch to "On."Step Result 1. Copy the production header code provided in the Embed tab of Dynamic Tag Management and place it within the HEAD section of your site HTML.Place the code as close to the <head> tag as possible. This code snippet should be placed on every page of your live production site.Production embed code reflects only the published items in that property. However, embed code for staging reflects all items in the associated property, regardless of the published or unpublished state. To test unpublished items on your production site, locally enable staging in the console by following the instructions in Test Unpublished Rules for Akamai Hosting.
- Copy the production footer code and place it in the BODY section of your site HTML.Place the code as close to the </body> tag as possible.
- Copy the staging header and footer code, then repeat the steps above on your staging site.The difference between production and staging code snippets is the addition of -staging to the filename in the staging version. The footer code remains the same in staging and production.