Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adobe Web SDK #49

Open
chahapra opened this issue Mar 4, 2022 · 0 comments
Open

Adobe Web SDK #49

chahapra opened this issue Mar 4, 2022 · 0 comments

Comments

@chahapra
Copy link

chahapra commented Mar 4, 2022

Hey Simo,

Thanks a lot for your great effort here. Your work has been super useful in constructing templates. I was wondering if you could look at the base code available for adobe sdk and give some direction on how it can be converted into a template? The min.js bit is easy, just injecting the script but the base code is where I am not able to work out how it can be changed. Below is the code. https://experienceleague.adobe.com/docs/experience-platform/edge/fundamentals/installing-the-sdk.html?lang=en

Totally understand if you are too busy and not able to work, below is my code.

`const injectScript = require('injectScript');
const copyFromWindow = require('copyFromWindow');
const aliasInWindow = require('aliasInWindow');
const setInWindow = require('setInWindow');
const log = require('logToConsole');
const createArgumentsQueue = require('createArgumentsQueue');
const callLater = require('callLater');

function getAlloy(){
let alloy = copyFromWindow('alloy');
if(alloy){
return alloy;
}
alloy = createArgumentsQueue('__alloyNS', 'alloy');

return alloy;
}

const alloy = getAlloy();

const url = "https://cdn1.adoberesources.net/alloy/"+data.version+"/alloy.min.js";

injectScript(url, data.gtmOnSuccess, data.gtmOnFailure, url);

setInWindow('alloy',alloy);`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant