Hi @priyankagupta20
how you implement it is up to you.
The Direct Call rule approach is the classic one, the Adobe Client Data Layer is the one recommended these days by Adobe.
Side note, you can pass in a second Param into _satellite.track which is the event payload , so could directly be your JSON.
_satellite.track(identifier, digitalData);
See also https://webanalyticsfordevelopers.com/2018/09/18/quick-tip-passing-data-into-launch-rules
With the ACDL, you could send it as eventInfo attribute .
adobeDataLayer.push(
event: identifier,
eventInfo: digitalData // assuming it is an object
)
One way or another, you have to decide which approach you prefer.
The ACDL has typically a bit of a learning curve but has one HUGE advantage: it can take calls before the Launch library is loaded. You can initialize it as array and once Launch loads, it will enrich the window.adobeDataLayer array into an object with more functionality, still providing the standard Array.push method
// ACDL approach
window.adobeDataLayer = window.adobeDataLayer || [];
window.adobeDataLayer.push(...)
// load Launch script...
window.adobeDataLayer.getState("...") // added function, provided by the ACDL extension
--------
// _satellite.track approach
_satellite.track("eventName") // will fail if Launch has not loaded, leading to lost calls or workarounds from your dev team
// load launch