Expand my Community achievements bar.

SOLVED

Adobe Launch Global Variable Dom Ready- Rules with Custom Condition Codes Help

Avatar

Level 2

Hello All!

 

We have a series of Launch rules that fire on Dom Ready with custom code conditions. For example, we have page template names with the condition of 'only firing if the template name exists' as javascript. 

 

Is it possible to place these in our page load global variable with other rules (eg: URL, Page Name, etc)? Can we place multiple java script conditions in one rule? 

 

LMK if I should elaborate on my question and, as always, thanks for the help!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can certainly use the same Conditions in other Rules. You'll just have to create them one-by-one in those Rules, since Launch doesn't allow copying of Rule components.

You can place multiple Conditions in one Rule. E.g. I have some Rules that have 4-5 Conditions. The processing time for the browser to work through the Conditions is negligible, given the speed of browsers these days.

View solution in original post

6 Replies

Avatar

Community Advisor

Hi it would help to understand what are these rule templates trying to help you tag?

 

Ideally you want alot of that page level data in your digitaldata object.

What type of page app is it? Single page app? java based app?

If you have certain rules criteria maybe looking at direct call rules could be an alternative way to go...

 

Are you trying to do some content type categorization?

Avatar

Level 2

Thank you for the reply!

 

This is for a large section of our site where we have a lot of content for other departments all housed under our large main website. 

 

For example, we have a rule that tracks various content topics. We have it set as a non-pageview hit at Dom Ready with a custom condition of 

if(_satellite.getVar("Topics Tag").length > 0){return true;}

 

It's set as a prop and evar for our content team.

 

This does send another non pageview hit to Adobe and it affects our bounce rate. I was wondering if this code could be placed in the data layer? Or if there's a way we can consolidate the rules that fire on these "if" statements? 

 

Our developer advised against placing multiple "if" statements in the rule due to potential conflicts. 

 

This also might be a dumb question, but what is a digitaldata object? I'm not on the development side. 

 

I very much appreciate the advice and let me know if I need to clarify anything else. 

Avatar

Community Advisor

Heres a link to show your devs intro in digital data layer.

 

https://experienceleague.adobe.com/docs/analytics/implementation/prepare/data-layer.html?lang=en

 

Basically once you define the data layer you could for example use meta tags for content types and then have them populate the data layer.

 

Another thing you could do is if each URL or page on your web site is unique to the section classifications then using SAINT you could one time upload all your hierarchies..

 

 

www.me.cm/level1/level2/level3/page1

www.me.cm/level1/level2/level3/level4/page2

www.me.cm/level1/level2/level3/level4/page3

 

Using SAINT you could then upload:

 

Page 1    - level1 - level2 - level3 

Page 2    - level1 - level2 - level3 - level4

Page 3    - level1 - level2 - level3 - level4

The beauty no JS no if statements just build against the key value.

 

This also allows in future if page changes levels or section just re upload it to show new values. You then report by each level if you like.

 

Hope this helps

Avatar

Level 2

Thank you so much! I really appreciate the detail and documentation. Again thank you!

Avatar

Correct answer by
Community Advisor

You can certainly use the same Conditions in other Rules. You'll just have to create them one-by-one in those Rules, since Launch doesn't allow copying of Rule components.

You can place multiple Conditions in one Rule. E.g. I have some Rules that have 4-5 Conditions. The processing time for the browser to work through the Conditions is negligible, given the speed of browsers these days.

Avatar

Level 2

Excellent! I'll forward this over to my dev team as well! Thank you!