CTA Embed code in Angular

SOLVE
New Contributor

How to use the CTA embed code in Angular 2+ project. Is there any examples to refer.

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Regular Advisor | Gold Partner | HubSpot Certified Trainer

@Prabu - It's pretty easy if you extract the pieces of the embed code. 

Check out the sandbox CTA I created, 

index.html & app/app.component.html

https://codesandbox.io/embed/angular-7-bootstrap-4-u5dxl

 

I moved the 2 scripts into the index.html file head

and put the html into app.component.html and it seemed to work fine.

Let me know.

2 Replies 2
Community Manager

Hey @Prabu 

 

I hope you are well. 

 

I was investigating and Angular 2+ is an external integration, so it's not a platform our team is familiar with so I can't offer any specific advice here. However, I was digging and I was able to find some information about this integration, and although they're not specific CTA-related examples, I believe can be helpful:

 

https://community.hubspot.com/t5/APIs-Integrations/New-quot-CTA-quot-and-quot-Topics-quot-Properties...

 

https://community.hubspot.com/t5/APIs-Integrations/Forms-and-Angular/td-p/231224

 

https://community.hubspot.com/t5/APIs-Integrations/Hubspotutk-cookie-in-Angular-7-App/td-p/234868

 

Maybe our experts can give you more context around this.

 

Hey @tjoyce @AJLaPorte_diagr @himanshurauthan do you have any experience on how to use CTA embed code in Angular 2+ that you would like to share with @Prabu ?

 

Thank you

Sharon 

Reply
0 Upvotes
Highlighted
Regular Advisor | Gold Partner | HubSpot Certified Trainer

@Prabu - It's pretty easy if you extract the pieces of the embed code. 

Check out the sandbox CTA I created, 

index.html & app/app.component.html

https://codesandbox.io/embed/angular-7-bootstrap-4-u5dxl

 

I moved the 2 scripts into the index.html file head

and put the html into app.component.html and it seemed to work fine.

Let me know.