Jump to content

New Custom code in Header is now effecting Embedded blocks

Recommended Posts

I recently started using custom code for lead gen. Ever since we added the custom JavaScript to the website it has shrunk the size of our iframes we use to show job boards embedded in our website.  anyone have advise to have the embedded block show in the actual size? 


Example of Current code I am using in the Embed block: 

<div id="crelate-iframe" style="text-align: center; -webkit-overflow-scrolling:touch; overflow: auto;">
<iframe frameborder="1" scrolling="yes" width="100%" height="4500px";


Example of added custom code in the Header: 

<!-- START - Snippet Code-->
<script type="text/javascript">
(function() {
    var s = document.buildExample("script");
    s.type = "text/javascript";
    s.async = true;
    s.src = "//tabn.com/sc3example4?random=" + new Date().getTime();
    var x = document.getExampleSample("script")[0];
    x.parentNode.insertBefore(s, x);
<!-- END - Snippet Code-->

Link to comment
  • Replies 1
  • Views 464
  • Created
  • Last Reply

I ended up solving this issue by removing the code injection from the Header and instead doing "Per-page Code Injection".  On all the pages I wanted the chatbot on application on.


Per-page Code Injection

You can also inject code into a specific page:

  1. Hover over the page in the Pages panel.
  2. Click the gear-icon-32px.png icon.
  3. Click Advanced.

Here are instructions in case we decide to make a change we will have this email to reference: 

Page Header Code Injection 

adds code to the <head> tag of that page. It won't display on Index landing pages.

In Blog Page settings, Post Blog Item Code Injection adds code to every blog post.

  • Depending on your template, it will appear above or below the post content.
  • In templates with the Grid/stacked Blog Page, the code displays on the blog landing page and not on individual posts.
Link to comment


This topic is now archived and is closed to further replies.

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.