CMS Development

TTram
Participante

Create a javascript module for landing pages

resolver

Hi, 

I have been given javScript code to add to a landing page that should create a live agent button. I follwed the steps to create a javascript file, but nothing apperars on the landing page when added. I am sure I am doing something wrong, but not sure what. 

Any help is appericated. Thanks

 

https://knowledge.hubspot.com/design-manager/add-a-javascript-file-to-hubspot

 

0 Avaliação positiva
1 Solução aceita
Jnix284
Solução
Membro do Hall da Fama | Parceiro Elite
Membro do Hall da Fama | Parceiro Elite

Create a javascript module for landing pages

resolver

Hi @TTram yes, that's correct - you would need to rewrite the javascript to not use inline execution.

 


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin

Exibir solução no post original

0 Avaliação positiva
7 Respostas 7
TTram
Participante

Create a javascript module for landing pages

resolver

This is the script I am trying to use and below is what I added to the landing footer. Thanks

Screenshot 2024-04-18 095359.png


Screenshot 2024-04-17 151110.png

0 Avaliação positiva
Jnix284
Membro do Hall da Fama | Parceiro Elite
Membro do Hall da Fama | Parceiro Elite

Create a javascript module for landing pages

resolver

@TTram when you open the page and inspect with the chrome dev console (right click > inspect), are there any errors on the console tab?

It might not work if you have it in both the Head and Footer HTML - it should be one or the other.

 


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin

0 Avaliação positiva
TTram
Participante

Create a javascript module for landing pages

resolver

I do see errors in the console. Does that mean the scriprt will not work for the landing page module? Screenshot 2024-04-18 174457.png

0 Avaliação positiva
Jnix284
Solução
Membro do Hall da Fama | Parceiro Elite
Membro do Hall da Fama | Parceiro Elite

Create a javascript module for landing pages

resolver

Hi @TTram yes, that's correct - you would need to rewrite the javascript to not use inline execution.

 


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin

0 Avaliação positiva
Jnix284
Membro do Hall da Fama | Parceiro Elite
Membro do Hall da Fama | Parceiro Elite

Create a javascript module for landing pages

resolver

Hi @TTram if you've added the javascript file to design manager, you would then need to call the script to load from the landing page via the landing page template or the Head HTML for the individual page.

 


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin

TTram
Participante

Create a javascript module for landing pages

resolver

I have added the script public url to the landing page footer, should I be adding something else to the footer? 

 

Thanks

0 Avaliação positiva
Jnix284
Membro do Hall da Fama | Parceiro Elite
Membro do Hall da Fama | Parceiro Elite

Create a javascript module for landing pages

resolver

@TTram can you share a screenshot of how you have it added?

 


If my reply answered your question please mark it as a solution to make it easier for others to find.



Jennifer Nixon - Delivery Lead at Aptitude 8

connect with Jen on Linkedin

0 Avaliação positiva