Library Download

Steps to deploy dynamic tag management using Library Download (the pull methodology).

The Library Download hosting option also lets you self-host the library files. When an authorized dynamic tag management user makes a change in the software, dynamic tag management writes those changes to the library files. When you host the library files on your servers with this option, dynamic tag management must get those changes to your servers. With the Library Download hosting option, dynamic tag management sends a ping (an HTTP post) to your system to let your servers know there has been an update to the library files. Your IT team can create a cron job, or other scripted process, so your servers can pick up the changed files. In this way, whenever a change is made in dynamic tag management, the files you are hosting on your servers can be updated automatically.

You must be an administrator to deploy using the Library Download.

  1. In the web property, click the Embed tab.
  2. Click Library Download in the left navigation.

  3. Fill out one or both of the following optional fields:
    Option Description

    Shared Secret

    Encrypts the dynamic tag management library during download.

    If you enter a shared secret, we use AES-256 to encrypt your .zip file using this passphrase.

    Deploy Hook URL

    The process of deploying dynamic tag management files to the server can be automated whenever there is an update. Create a script that is accessible via the specified public URL.

    If you enter a deploy hook URL, we make an HTTP POST to it every time we successfully update your bundle. The body of the post will include a payload containing the download URL of the bundle.

  4. Complete the fields under Domain and Paths to Tracking File, for staging and production.

    Specify the location where the files reside when deployed to your server. Do not include the protocol or any leading or trailing slashes. Dynamic tag management requires a domain and a path for HTTP or HTTPS for the production and staging environments.

    Note: Click Enable Relative Hostnames for Staging and Production Library Hosting, if desired. Enabling relative hostname prepends the provided library paths with "window.location.hostname". This allows DTM to load hosted scripts from relative paths, giving you the ability to host your library without editing your path for each deploy.
  5. Download the files from the specified URL for the respective environment (staging or production), and deploy them to the location specified in the settings.
  6. Click the Header Code and Footer Code sections.
  7. Click the appropriate Copy Embed Code button to copy header and footer codes for your staging or development environments.
    Note: The staging code should go only into your staging or development environment. Production code should be placed on the live production site.
  8. Copy the header code and place it within the HEAD section of the site HTML, on every page of the website. Place it as close to the beginning <head> tag as possible.
  9. Copy the footer code and place it within the BODY section of the site HTML, on every page of the website. Place it as close to the closing </body> tag as possible