How to get the environment name in analytics. | Community
Skip to main content
Level 3
February 9, 2021
Solved

How to get the environment name in analytics.

  • February 9, 2021
  • 3 replies
  • 1766 views

I have one rule in analytics that rule need to be  enablle only in prod and it should be disable in stage how can I achive this.?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Brian_Johnson_

@vijitha - If you want a "set it and forget it" approach, consider creating a data element with the value of _satellite.buildInfo.environment and using it to conditionally execute/not execute your rule. You shouldn't have to worry about enabling/disabling the rule as you promote through the different environments.

 

 

3 replies

Adobe Employee
February 9, 2021

You can disable the rule, add the disabled rule in the development environment and push it through the staging environment. The rule won't work in the staging environment.

In other words, you will need to add a disabled rule to an environment to remove it from the upstream resources.

vijithaAuthor
Level 3
February 9, 2021
Hi @isinha As of now I am following the same procedure but when we push that environment to production again will create new environment for stage so every time i am repeating the same procedure.If we have any condition to check the environment name we can avoid that procedure.
Brian_Johnson_
Brian_Johnson_Accepted solution
Level 8
February 9, 2021

@vijitha - If you want a "set it and forget it" approach, consider creating a data element with the value of _satellite.buildInfo.environment and using it to conditionally execute/not execute your rule. You shouldn't have to worry about enabling/disabling the rule as you promote through the different environments.

 

 

yuhuisg
Community Advisor
Community Advisor
February 10, 2021
@vijitha if you don't want to add custom code, install the "SDI Toolkit" extension from Search Discovery. You can then create a data element that returns the Launch build info.
jantzen_b
Adobe Employee
Adobe Employee
April 6, 2021
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?