Expand my Community achievements bar.

SOLVED

DTM Cloud service

Avatar

Employee Advisor

The DTM cloud service in AEM gives an option to include production scripts on author and an option to include staging script on author and production script on publish. I have a requirement to include staging scripts always(for both author and publish) in lower environments (DEV, QA, Stage) and production scripts on Prod. Is it possible to achieve this with DTM cloud service configs ? If not, then should I hard code the include script code in base page template for lower environments. 

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi

Best practice is to use Staging on staging environment and Production on live environment.

 

Default Behavior 

When you are setting up DTM via AEM using cloud services, make sure you Check/Unchek Include Production code on Author as per your need.

    Include Production Code on Author 
    Select this option to cause the AEM author and publish instances to use the production version of the Dynamic Tag Management libraries. 

    When this option is not selected, the Staging Settings apply to the author instance, and the Production Settings apply to the publish instance.

But you want Staging to be part of both instance. For that:

Option 1:

IN DTM, set two DTM properties:

1. Normal (Production report suit contains Prod name and Stage contain Stage)

2. Modified (Production report suit contains Stage name and Stage contain Stage)

 

And IN AEM add both DTM cloud Services.

Option 2:

1. Un-check "Include Production code on Author"

2. In DTM  

    a. Select your property

    b. Go to Analytic tool settings

    c. Go to "Customize Page Code" (Select After UI settings (custom code takes precedence)) Here write a logic to check if URL of page (windows.location.href) is of Publish instance then set s.account="Staging report suit, Prod report suit". This will make sure that data from publish instance would goes to production server and staging server. 

Reference link:= https://marketing.adobe.com/resources/help/en_US/reference/index.html?f=multisuite_tagging

//  s.account="rsid1,rsid2"

 

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Level 4
        Hi, I would suggest to have a separate service and for which you can separate configurations for each environment. Regards Ankur

Avatar

Employee Advisor

That will not solve the problem because there is no option to include staging scripts on publish instance using the cloud service. In lower environments the cloud service will include production scripts in publish instance which is not desired. 

Avatar

Correct answer by
Administrator

Hi

Best practice is to use Staging on staging environment and Production on live environment.

 

Default Behavior 

When you are setting up DTM via AEM using cloud services, make sure you Check/Unchek Include Production code on Author as per your need.

    Include Production Code on Author 
    Select this option to cause the AEM author and publish instances to use the production version of the Dynamic Tag Management libraries. 

    When this option is not selected, the Staging Settings apply to the author instance, and the Production Settings apply to the publish instance.

But you want Staging to be part of both instance. For that:

Option 1:

IN DTM, set two DTM properties:

1. Normal (Production report suit contains Prod name and Stage contain Stage)

2. Modified (Production report suit contains Stage name and Stage contain Stage)

 

And IN AEM add both DTM cloud Services.

Option 2:

1. Un-check "Include Production code on Author"

2. In DTM  

    a. Select your property

    b. Go to Analytic tool settings

    c. Go to "Customize Page Code" (Select After UI settings (custom code takes precedence)) Here write a logic to check if URL of page (windows.location.href) is of Publish instance then set s.account="Staging report suit, Prod report suit". This will make sure that data from publish instance would goes to production server and staging server. 

Reference link:= https://marketing.adobe.com/resources/help/en_US/reference/index.html?f=multisuite_tagging

//  s.account="rsid1,rsid2"

 

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni