Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to get the environment name in analytics.

vijithar4145255
Level 2
Level 2

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.?

1 Accepted Solution
evolytics_brian
Correct answer by
Community Advisor
Community Advisor

@vijithar4145255 - 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.

 

evolytics_brian_0-1612895929502.png

 

View solution in original post

6 Replies
ishans52004352
Employee
Employee

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.

vijithar4145255
Level 2
Level 2
Hi @ishans52004352 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.
evolytics_brian
Correct answer by
Community Advisor
Community Advisor

@vijithar4145255 - 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.

 

evolytics_brian_0-1612895929502.png

 

View solution in original post

yuhuisg
Community Advisor
Community Advisor
@vijithar4145255 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_belliston-Adobe
Community Manager
Community Manager
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?