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

Cue the extraordinary. Show-stopping experiences that raise the digital bar. Apply now for the 2023 Adobe Experience Maker Awards.

best practices for handling 3rd party pixel or custom code in Launch


Community Advisor


can someone share what's the best practices for handling 3rd party pixel or custom code in Launch. 


Reason being - having the launch property with multiple rules and data elements - we deploy the 3 party pixel either using extension or by adding as custom code in action part of the rule.  


Now when we add the any custom js into action part of the rule - That means, for every single action of the “custom code” launch generates additional sub file. 


This sub file may be less or big in size depending on the JS code but  - if there are multiple sub files getting generated on landing page - its impact on the performance of the page. 


So is there any way we can optimize this and includes all the things in Launch main library and not in sub files. 




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

4 Replies


Community Advisor

If there isn't an extension for your pixel, then you're stuck with Custom Code.

If you're using Custom Code, why can't you include everything in one big Custom Code action? Then only one sub file will need to be downloaded.


Community Advisor
@yuhuisg - Thanks for reply. One big custom code is not the possible option as different pixel takes effect on different pages and different scenarios. So relying on one thing is not the good way right?


Community Advisor
@Gokul_Agiwal In that case, there isn't much else that you can do. The appropriate custom code sub files will be loaded with the relevant pages/scenarios. However, given that Launch loads asynchronously (unless you aren't doing so), then all required sub files will be loaded without any noticeable degradation in the web page's performance.


Level 4

An easy way to cheat is to add your custom code as a condition. Conditions are loaded with the main js file. You can also in your condition do something like

window.setTimeout(function(){ /*really load*/}, 1000) which defers the execution of the code for another second.


The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now