Expand my Community achievements bar.

SOLVED

Conditions in Launch

Avatar

Community Advisor

Do the logical conditions in Launch Regular or Exception allows DOM ready rules to exclude subdomains from main domain for rule firing?

 

for example, my domain and subdomain have the same Adobe Launch environment code. And, I have one DOM-ready rule that I want to fire only for the main domain https://www.abba.com .. Can I exclude this DOM rule from firing on my subdomain https://qwert.abba.com like below (considering both domain and sub-domain has the same Adobe launch code on them): 

jsvasu_0-1685054581890.png

jsvasu_1-1685054811231.png

 Thanks

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

Domain isn't part of the path... so that rule as you posted won't work... 

 

There are however rules for Domain and Subdomain:

Jennifer_Dungan_0-1685067822086.png

 

 

Domain uses the domains that have been added to the Launch property configurations... 

 

Subdomain allows you to enter the subdomain you are trying to match:

Jennifer_Dungan_1-1685067937857.png

 

 

I have not used Subdomain myself, so if you have qwer.abba.com I don't know if you if you need to enter "qwer.abba.com" or just "qwer".... I suspect the first, but you should be able to test this condition quickly and make adjustments if it doesn't work the first time.

 

FYI, testing this can be made easier by enabling the Satellite Debug Mode... if you are familiar at all with using your browser's console, you can turn on and off debug mode with:

// Turn it on
_satellite.setDebug(true)

// Turn it off
_satellite.setDebug(false)

 

When enabled, you will get all the logs from Launch, telling you which rules fired, and which rules didn't fire based on conditions not being met... 

 

Good luck.

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor and Adobe Champion

Domain isn't part of the path... so that rule as you posted won't work... 

 

There are however rules for Domain and Subdomain:

Jennifer_Dungan_0-1685067822086.png

 

 

Domain uses the domains that have been added to the Launch property configurations... 

 

Subdomain allows you to enter the subdomain you are trying to match:

Jennifer_Dungan_1-1685067937857.png

 

 

I have not used Subdomain myself, so if you have qwer.abba.com I don't know if you if you need to enter "qwer.abba.com" or just "qwer".... I suspect the first, but you should be able to test this condition quickly and make adjustments if it doesn't work the first time.

 

FYI, testing this can be made easier by enabling the Satellite Debug Mode... if you are familiar at all with using your browser's console, you can turn on and off debug mode with:

// Turn it on
_satellite.setDebug(true)

// Turn it off
_satellite.setDebug(false)

 

When enabled, you will get all the logs from Launch, telling you which rules fired, and which rules didn't fire based on conditions not being met... 

 

Good luck.

Avatar

Community Advisor and Adobe Champion

@Jennifer_Dungan wrote:

 

I have not used Subdomain myself, so if you have qwer.abba.com I don't know if you if you need to enter "qwer.abba.com" or just "qwer".... I suspect the first, but you should be able to test this condition quickly and make adjustments if it doesn't work the first time.

 


My bet is just "qwer" and not trying myself either . When I want to do the same, I usually use custom code condition and write JavaScript to check for window.location.hostname

Avatar

Level 1

This issue just came up for us. In my testing, it required "qwer.abba.com" unless you toggle to use regex. Seeing the reply from @leocwlau, is there a reason you would use Custom JavaScript over the Core Component?

Avatar

Community Advisor and Adobe Champion

I'm like @leocwlau, I would usually just use Custom JS...  but that's the developer in me....

 

Also, my conditions often have caveats, so making it custom code lets me have full control... but this really comes down to two things:

 

  • personal preference
  • does the rule do what you need it to do

 

Basically, if the conditions using the list of options works, then you should be okay... If you know code, and need some more complexities, then custom code can be more efficient.