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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to get the environment name in analytics.

Avatar

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

Avatar

Correct answer by
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

0 Replies

Avatar

Employee Advisor

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.

Avatar

Level 2
Hi @Ishan_Sinha_ 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.

Avatar

Correct answer by
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

 

Avatar

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.

Avatar

Level 10
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?