Embed launch script for typescript applications | Community
Skip to main content
New Participant
May 24, 2023
Solved

Embed launch script for typescript applications

  • May 24, 2023
  • 2 replies
  • 2847 views

Hi all,

 

We have a application which uses typescript and are facing issues to embed the launch script. Need help on how we could do this.

 

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gokul_Agiwal

Hello @jane_12 

What issues you're facing .. could you please provide more details like error or screenshot? 

Meantime, please see below documentation and see if you have embed the code in right way 

https://experienceleague.adobe.com/docs/platform-learn/implement-in-websites/configure-tags/add-embed-code.html?lang=en 

2 replies

Jennifer_Dungan
New Participant
May 24, 2023

Technically, there should be no issues running Typescript and Javascript together on the same site.. Typescript is a superset of Javascript, unless of course you are using a compiler which is converting all .js files to use the .ts file extension (and it's changing the Adobe Files as well). Since the Adobe scripts aren't hosted on your server, that could affect targeting... but surely you have ads or other third party scripts loading on your site that are using JS...

 

Can you provide more information about the issue you are getting? I don't work with Typescript sites, so I don't have an "actual" example to work with and can only guess at the issue you are encountering....

jane_12Author
New Participant
May 25, 2023

@gokul_agiwal and @jennifer_dungan ,

The application uses SharePoint Framework (SPFx) used for development of SharePoint Online applications.

Jennifer_Dungan
New Participant
May 25, 2023

Oh dear... it's SharePoint too?

 

Is the code live? Would you be willing to share the URL (even if through a private message) so we can see what is happening in the network panel and console logs?

Gokul_Agiwal
Gokul_AgiwalAccepted solution
New Participant
May 24, 2023

Hello @jane_12 

What issues you're facing .. could you please provide more details like error or screenshot? 

Meantime, please see below documentation and see if you have embed the code in right way 

https://experienceleague.adobe.com/docs/platform-learn/implement-in-websites/configure-tags/add-embed-code.html?lang=en 

jane_12Author
New Participant
May 24, 2023

Hi @gokul_agiwal ,

 

Don't have the screenshots but the application uses TypeScript instead of JavaScript for client-side programming. So the launch embed script which is JavaScript, isn't working.

Gokul_Agiwal
New Participant
May 24, 2023

so In this case, you have to include as external JS library ( Launch library) and import it into your typescript application.