Skip to main content
Level 2
December 23, 2024
Beantwortet

How to configure datastream id dynamicaly

  • December 23, 2024
  • 5 Antworten
  • 1020 Ansichten

Hu Team,

I wanted to configure datastream id dynamicaly based on environment using custom code.

 

Thanks in advance 🙂

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von Amruthesh_AG

@yashre1  You need to create datastreams based on your requirement (Ex: Dev, Production).

and then you need to pass the data element in Adobe Experience Platform Web SDK extension configuration. not in the datastreams creation.

 

5 Antworten

Amruthesh_AG
Community Advisor
Community Advisor
December 23, 2024

@yashre1  You can create data element and add below custom code to set dynamically based on environment type.

 

var libEnv= _satellite.environment.stage;
if (libEnv == "staging")
{rsid= "Enter staging data steam id";}
if (libEnv == "development") {
rsid="Enter development data steam id";}
if (libEnv == "production"){
rsid="Enter production data steam id";}
return rsid;

YashRe1Autor
Level 2
December 23, 2024

@amruthesh_ag  I have created data element and added the code but I was not getting option to select the data element in datastream. How to achieve this?

I am new to websdk migration.

Amruthesh_AG
Community Advisor
Community Advisor
December 23, 2024

@yashre1  You need to create datastreams based on your requirement (Ex: Dev, Production).

and then you need to pass the data element in Adobe Experience Platform Web SDK extension configuration. not in the datastreams creation.