adobe / adobe/adobe-client-data-layer
Capability to instantiate multiple data layers
- Lingua principale
- JavaScript
- Stelle
- 122
- Fork
- 28
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
It would be useful to be able to create different instances of the Data Layer that can be named as desired. The use-case is that customers might want to use the same Data Layer API to store other data that they don't want to mix with the main adobeDataLayer. For example, because this data has different privacy rules, and they can then better guarantee that this other data won't get sent to the same tracking services.
This requirement doesn't impact how we'd use the Data Layer in most cases, though. For example, in Core Components, which would always rely on the existence of a specific variable, like `adobeDataLayer`. But it means that the Data Layer API must not be a singleton, but should allow being instantiated multiple times. Is this possible already? For example:
`var myOtherData = new AdobeDataLayer();`
Allowing to make it an object we can instantiate would also help for unit testing it, for example.
This has been documented here:
https://github.com/adobe/adobe-client-data-layer/wiki/Adobe-Client-Data-Layer#new-instance
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Leggi prima la sezione wiki collegata, quindi traccia l’API corrente di Data Layer e il suo comportamento singleton. Determina come potrebbero coesistere istanze denominate in modo indipendente preservando il caso d’uso documentato di adobeDataLayer; il lavoro sarà completato quando il comportamento delle istanze sarà verificabile tramite unit test e non sarà necessario modificare l’uso esistente di Core Components.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- web-dev
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100