Expand my Community achievements bar.

SOLVED

The library has already been configured and may only be configured once.

Avatar

Level 4

I am trying to use "configure" command for onBeforeEventSend. But getting error that library already configured. Let me know how to solve this.

 

alloy("configure", {
"onBeforeEventSend": function(content) {
// Change existing values
content.xdm.web.webPageDetails.name = "Checkout"
}
});

 

V_Sirish_Kaushik1_0-1700652398643.png


I have not used configure command anywhere else, other than in the dedicated field in web sdk extension

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

 Hey @V_Sirish_Kaushik1 

I guess you are using this custom snippet in addition to the extension.

 

You should be using either of the two.

If you want to use callback then that is part of the sdk extension itself. Use that one instead of the above custom snippet.

 

IMG_5352.jpeg

 

https://experienceleague.adobe.com/docs/experience-platform/tags/extensions/client/web-sdk/web-sdk-e....

 

Hope the above helps.

 

Regards,

Abhinav

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

 Hey @V_Sirish_Kaushik1 

I guess you are using this custom snippet in addition to the extension.

 

You should be using either of the two.

If you want to use callback then that is part of the sdk extension itself. Use that one instead of the above custom snippet.

 

IMG_5352.jpeg

 

https://experienceleague.adobe.com/docs/experience-platform/tags/extensions/client/web-sdk/web-sdk-e....

 

Hope the above helps.

 

Regards,

Abhinav

Avatar

Level 4

Hi Abhinav, 

 

I didn't understand. 
Where are you suggesting I call configure command. There seems to be only place to place that code. 

 

Avatar

Community Advisor

Hey @V_Sirish_Kaushik1 

In the above screenshot, right at the top there is place to put in your callback code. Don't put in the entire alloy snippet bur just the bit you want to use in the callback function.

 

That should address the issue.

 

Let me know if it is still not clear and I can try to add more details.

 

Cheers,

Abhinav