Expand my Community achievements bar.

Join us at Adobe Summit 2024 for the Coffee Break Q&A Live series, a unique opportunity to network with and learn from expert users, the Adobe product team, and Adobe partners in a small group, 30 minute AMA conversations.
SOLVED

Inline Java Script vs Custom Code in Launch

Avatar

Level 1

All am doing research on analytics and looked at few projects now. I have a question on difference between inline java script and using Launch custom code.
I have seen projects which are using only data elements with JavaScript Variable and direct call rules only. This is making Launch mostly configuration tool and HTML page is doing lot of work to populate data elements. There are other kind of projects which use all launch features CSS selectors for data elements and rules and perform whole process. This has lot of advantages and decouples the implementation from website. But as per all of your experiences what is the best and most used approach.

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

The best approach is somewhere in the middle. When the implementation fully relies on data layer (global JS variables) then any new change requires an update on the website that takes long and sometimes it's now worth it resources wise. When the data elements are mapped only to CSS selectors, there is a high risk of data loss due to html/markup changes.

Consider mapping the Launch data elements to data layer whenever possible, for the rest use the other available options.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

The best approach is somewhere in the middle. When the implementation fully relies on data layer (global JS variables) then any new change requires an update on the website that takes long and sometimes it's now worth it resources wise. When the data elements are mapped only to CSS selectors, there is a high risk of data loss due to html/markup changes.

Consider mapping the Launch data elements to data layer whenever possible, for the rest use the other available options.

Avatar

Level 1
ok so you suggest to utilize data layer to populate data elements and use other options as required. But as you mentioned this will required changes to the website and may require redeploy whenever there are changes to data layer.