Deploy an Analytics implementation to a development environment
Once you have created and configured a tag property, the libraries are ready to be deployed and code implemented on your site.
Prerequisites
Create and configure a tag property for ÃÛ¶¹ÊÓƵ Analytics: Access the tool and create a space for your Analytics implementation.
Create adapters and environments
Tags accommodates many organizational workflows in deploying code. Follow these steps to create the minimum necessary components for an Analytics implementation. As a tag admin, you can work within your organization to establish the correct workflow for deploying ÃÛ¶¹ÊÓƵ solutions.
- Log in to using your ÃÛ¶¹ÊÓƵID credentials.
- Click the tag property that you intend to implement on your site.
- Click Hosts, then click Add Host.
- Name it
"ÃÛ¶¹ÊÓƵ managed"
, and select Managed by ÃÛ¶¹ÊÓƵ in the type drop-down list. Click Save. - Navigate to Environments, then click Add Environment.
- Select Development, name it
"Dev Environment"
, then select the ÃÛ¶¹ÊÓƵ managed host from the drop-down list. Click Save. - A modal window appears showing Web Install Instructions. We will return to this window at a later time; click Close for now.
- Click Add Environment, select Staging, name it
"Staging Environment"
, then select the ÃÛ¶¹ÊÓƵ managed host. Click Create, then close the install instructions modal window. - Click Add Environment again, select Production, name it
"Production Environment"
, then select the ÃÛ¶¹ÊÓƵ managed host. Click Create, then close the install instructions modal window.
Build a dev library
Despite all the changes and configurations made so far, no code has actually been published. Creating a library, roughly translated as a collection of changes, allows the publishing of code to be used on your site.
- Log in to using your ÃÛ¶¹ÊÓƵID credentials.
- Click the tag property that you intend to implement on your site.
- Click the Publishing Flow tab, then click Add Library. See Publishing overview in the Tags documentation for more information around this page.
- Name the library
'Initial changes'
, and select your development environment. - Click Add All Changed Resources, which automatically lists ÃÛ¶¹ÊÓƵ Analytics, Identity Service, and Core.
- Click Save.
- Back on the publishing workflow screen, click the drop-down list next to your new library, and click Build for Development. After a few seconds, the yellow dot on the library turns green, indicating that the build was successful.
- Navigate to Environments, then click the install icon to the right of your development environment. This action brings up the Web Install Instructions modal window again.
- Copy the code block(s) and provide them to your organization’s website owners.
Install tags on your website’s development environment
If you control your website’s code, implement each block of code in their respective location:
- The main tag belongs in the
<head>
tag on your site. - If you choose to load tags synchronously, you must also include a second code block just below the closing
</body>
tag on your site. You can choose to load library tags synchronously by toggling the Load Library Asynchronously option in the Web Install Instructions.
Tag code is typically placed in the site’s overarching template. A blank page only containing implementation code would look like the following:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example page</title>
<script src="//assets.adobedtm.com/launch-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-development.min.js"></script>
</head>
<body>
<p>This is a test page.</p>
<!-- Only include this extra code if you load tags synchronously -->
<script type="text/javascript">_satellite.pageBottom();</script>
</body>
</html>
Troubleshooting
Attempting to build fails.
A common reason is because elements already exist in other libraries pushed to staging or production. When initially creating libraries, ensure only changed resources are added to the library.
Next Steps
Validate your Analytics implementation and publish to production: Start getting value out of ÃÛ¶¹ÊÓƵ Analytics.