Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.

Terminate Launch

Avatar

Level 1

Is there a function to terminate launch from loading?

 

Scenario:

I have a function to check if browser do not track is set to true. If true, Adobe launch should terminate so no rules are loaded. I have a working condition for this check but only at the individual rule level. This means I need this condition to be applied to each and every rule I need stopped based on browser DNT setting. Is it possible to have this in one rule that loads first but can stop the container from loading more any rules?

 

Also are there any effective methods that differ from the above description? I don't want to pay for a 3rd party service.

 

Thanks

 

1 Reply

Avatar

Level 10

Based on initial ask which "Is there a function to terminate launch from loading?"

 

Best option would be to wrap Adobe Launch reference on your HTML page with a condition

<script>
function isLaunchSafeToLoad() {
    //your logic
    if (...) { //logic to prevent from loading
        return false
    }
    //OK
    return true
}

let targetScript = document.getElementsByTagName("script")[1];
let adobeLaunch = document.createElement("script");

//load launch conditionally
if (isLaunchSafeToLoad()) {
    adobeLaunch.src="//assets......min.js";
    targetScript.insertAdjacentElement('afterend', adobeLaunch);
}
</script>

 Now if you want to do it at runtime then what you describe is the same as what we encounter nowadays with cookie management policy where we need to wait on customer to select specific cookie group to trigger the rule. Unfortunately there is not much you can do here than to apply the condition to each and every rule.