Hi @kamranali,
I am unsure why this is happening with the Target for SPA, but you can add some code that only injects your code if it still needs to be added. In your custom code within Target, add a flag such as this example:
// Check if code has already been loaded
if (window.offerLoaded === true) {
return;
}
// Set flag to true to indicate code has been loaded
window.offerLoaded = true;
This should prevent the code from injecting twice from your specific activity.
I suggest opening a client care ticket and having them see if they can provide you with a more permanent fix, so you do not need to add a flag to each activity/custom code.
email to open a ticket: ttclientcare@adobe.com
I hope that helps.
Matthew Ravlich | ACG Digital | albertacg.com