||Discusses how to use Activation rules (formally Dynamic Tag Management) in AEM 6.1 web pages.|
|Digital Marketing Solution(s)||Adobe Experience Manager (Adobe CQ), Activation|
|Tested On||Adobe Experience Manager 6.1|
You can integrate Adobe Experience Manager (AEM) with Adobe Marketing Cloud Activation Core Services (formerly named Dynamic Tag Management). Activation is an Adobe Marketing Cloud Core Service that allows a digital marketer to manage Adobe and third-party tags used for tracking or other analytics purposes. It is done through client-side scripting that injects tag related code throughout the pages of the site.
Once you define and approve Activation rules using the Activation web client, you can embed these rules into AEM web pages. When this rule is embedded into an AEM web page, this rule is fired when an AEM web page is opened in Chrome, as shown in this illustration.
This development article walks you through these tasks:
- how to defines rules using the Activation web client
- how to set-up an Activation connection from within AEM
- how to embed Activation rules in AEM web pages
To follow along with this development article, you need a Marketing Cloud Account.
To learn more about Activation (formally Dynamic Tag Management), see Dynamic Tag Management Product Documentation.
In this artilce, a cloud-hosted solution is used. For more information, see https://docs.adobe.com/docs/en/aem/6-1/administer/integration/marketing-cloud/dtm.html.
Activation is a rule-based system. It looks for user interaction and associated data. When the criteria specified in your rule is met, the rule triggers the tool, script, or HTML you identified. A rule consists of two parts:
An identifier what is the rule looks for:
- An event-‐based rule is dependent on user interaction with the page.
- A page load rule is dependent on the URL, site section, or on the user’s site visit length.
- A direct call rule is dependent on a specific call that is initiated by a custom script.
To create an Activation rule, perform these tasks:
1. Log into Activation at http://dtm.adobe.com.
2. Create a web property by clicking on the Add Property button within the Company page. A Property is defined per domain basis.
3. Complete the Property form then click Create Property. The required fields are Name and
URL. Name the Property AEM and specify the URL to the AEM server.
4. The new property requires approval from an Admin. Once approved it will go to Active state, which means you’re now ready to start configuring the Property.
5. From the Web Properties tab, click on the AEM property, as shown here.
6. From the left hand menu, select Page Load Rules and then click Create New Rule. This action opens the Create New Page Load Rule screen.
7. Name the Activation rule TestOnLoadChome.
8. Under the Conditions section, select Onload from the Trigger rule at drop-down. Then select Browser from the Criteria drop‐down list then select Add Criteria. Once selected, check the Chrome option.
10. From the editor popup, enter Hello Chrome for the Tag Name and enter the following code:
After you create the OnLoadChrome rule, you have to activate it before you can use it. To activate the rule, go to the Approvals tab and select Approve for the OnLoadChrome rule. Once you perform this task, you can use it within an AEM web page.
You need administrative privileges to activate a rule.
Click the Embed tab and select one of the available deployment options in the left sidebar. In this example, select the Akamai option.
Copy the Staging Embed Code for Header and Footer code. For example:
This is the script that is referenced when you configure AEM (in the next step). This script value is required for this rule to be used in an AEM web page.
Setup an AEM cloud configuration connection to Activation. To connect from AEM to Activation, you will require these values:
- API Token - The value of the API Token property of your Dynamic Tag Management user account. AEM uses this property to authenticate with Dynamic Tag Management.
- Company - The company with which your login ID is associated. (this value appears when you enter the API Token value)
- Property - The name of the Web Property that you created for managing the tags for your AEM site.
- Header code - the Header code that you created in Activation.
- Footer code - the Footer code that you created in Activation.
To connect to Activation, you require an Activation API token value that is specific to your Activation account, as shown in this illustration.
In the Staging Settings and Production Settings tab, enter the required values, as shown here (ensure that the self hosting checkbox is un-checked).
To retrieve the API Token value, contact Customer Care.
Then click on click on Account Settings. The API Token value is located near the bottom of the screen, as shown in this illustration.
To configure an AEM connection to Activation, perform these tasks.
- To view the CQ welcome page, enter the URL http://[host name]:[port] into a web browser. For example, http://localhost:4502.
- From the rail, select Tools, Operations, Cloud, Cloud Services.
- Under Dynamic Tag Management, click Show Configurations.
- Click Configure Now if this is the first configuraiton that you are adding.Click Show Configurations and then click the + link beside Available Configurations if one or more configurations have been created.
- Type a title for the configuration and then click Create.
- In the API Token field, enter the value of the API Token property of your Dynamic Tag Management user account.
- Click Connect to DTM. AEM authenticates with Dynamic Tag Management and retrieves the list of companies that your account is associated with.
- Select the Company, and then select the Property that you are using to track your AEM site.
- If you are using staging code on the author instance, deselect Include Production Code On Author.
- Provide the script values for the properties on the Staging Settings tab and the Production Settings tab (make sure the self hosting checkbox is un-checked), then click OK.
Embed Activation rules into an AEM web page by using Page properties that belong to the AEM site. In this example, embed Activation rules into the Geometrix Media site. First, Login to the AEM author instance and go to
as showin in this illustration.
Right click on the page (in this example, English) and select properties. Next, select the Cloud Services tab. Then click the Add Service button. This brings up a list of Digital Marketing Cloud Services, as shown in this illustration.
Select Dynamic Tag Management and click Ok. In the Dynamic Tag Management drop-down control, select the AEM configuration that you setup. Now rules associated with this configuration will show up in the AEM site. (In this example, the name of the configuration is ScottTest.)
Now rules defined in Activation appears in the Geometrixx Media sample site (as shown in the illustration at the start of this article). When you open a page in Chrome, an alert box is displayed.
Congratulations, you have just used Activation rules in AEM web pages. Please refer to the AEM community page for other articles that discuss how to build AEM services/applications.