Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Using dynamic Datastream ID value in WebSDK extension.

Avatar

Level 6

Hi,

 

We are using Web SDK and working on a scenario where the data has to be sent to a different report suite and also event forwarding destinations depending if the web page is accessed in mobile web view or normal browser.

 

We thought of using Datastream report suite override but it seems it cannot take care of the event forwarding destinations.

 

So we created 2 differnet data streams, and tried to use the "Enter Values" in the Web SDK extension Data Stream config., like below,

Hey_John_0-1720526571956.png

 

But it is not working as expected, as the data stream ID always follows the default value of the data element, and it won't use the other data stream ID value popluated.

 

Anyone have experience on this?

 

Thanks,

John

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 6

Just found that it's possible to override the whole Data Stream ID in the rule/sendEvent level.

 

Not sure why the same setting in the extension level does not work, but we tested the one in the rule/sendEvent level and it works.

 

Hey_John_0-1720621405087.png

 

View solution in original post

6 Replies

Avatar

Community Advisor and Adobe Champion

@Hey_John The datastream override is for configurations made within the datastream and not really overriding the actual datastream. 

You can achieve the adobe analytics reportsuite override with this approach but not really switch datastream using the webSDK extension. 

 

There are however couple of ways to do this 

  1. use WebSDK ( alloy.js) within the app and dynamically change the configurations (datastream etc..) 
  2. use WebSDK serverside and switch configurations on the go 

Anil

 

 

Avatar

Level 6

Hi @Anil_Umachigi 

 

Thanks for your reply.

 

Since we also need to send to different server side forwarding destinations, datastream override seems cannot help.

 

Apart from the other methods you mentioned. Would also like to understand more on why it's allowed to enter data element as values for the Data Stream ID in the Web SDK extension config?

 

Thanks,

John

Avatar

Community Advisor and Adobe Champion

@Hey_John I was reading more around this, this may be possible within launch, Let me try this out  and get back to you. 

You may be facing the issue coz of RACE conditions, is the value for teh data element available before the web SDK extenion runs? 

 

Anil 

Avatar

Level 6

Hi @Anil_Umachigi 

 

The data element value for the data stream ID is populated in a button click event, so there should be no race condition. And we still see the event call sent to the default data stream ID.

 

Thanks,

John

 

Avatar

Correct answer by
Level 6

Just found that it's possible to override the whole Data Stream ID in the rule/sendEvent level.

 

Not sure why the same setting in the extension level does not work, but we tested the one in the rule/sendEvent level and it works.

 

Hey_John_0-1720621405087.png

 

Avatar

Level 6

Just received an update from Adobe that this issue is fixed, i.e. we can use a data element variable as the data stream ID in the Web SDK extension level, and when you send event, the data stream ID will be based on the run-time value of the data element.