How to get the environment name in analytics.

Avatar

Avatar

vijithar4145255

Avatar

vijithar4145255

vijithar4145255

09-02-2021

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar

evolytics_brian

MVP

Avatar

evolytics_brian

MVP

evolytics_brian
MVP

09-02-2021

@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

Avatar

ishans52004352

Employee

Avatar

ishans52004352

Employee

ishans52004352
Employee

09-02-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.