Andrew_w Posted January 8 Share Posted January 8 Hi, I'm hoping someone may be able to kindly assist. I am trying to embed a trust badge on my website - https://www.simplehonours.co.nz/study-cb. I have obtained the javascript code provided and embedded this via a code block on my site. However when I save this, the outcome / badge is not displayed. Once I've entered the code, as expected I receive the message stating that the embedded script is disabled while I'm logged in. I then log out and open the page in a separate incognito tab but still nothing is displayed. I'm unsure if it is an issue with the code or the way I'm adding it to my site. It appears to be a well used and readily available code that's referred to in many blogs. But unfortunately, ClickBank's Knowledge Base Article which is supposed to be used to help implement the badge is not available and appears to have been removed from their support site. I'm using Squarespace version 7.1, so it shouldn't be an Ajax loading issue or an index page issue. I've tried repositioning the code to other pages and opening in safe mode, but nothing seems to work. Any help or advice would be much appreciated. Screenshots below. Link to comment
paul2009 Posted January 8 Share Posted January 8 (edited) On 1/8/2023 at 1:24 AM, Andrew_w said: I am trying to embed a trust badge on my website. I have obtained the javascript code provided and embedded this via a code block on my site. However when I save this, the outcome / badge is not displayed. This should ideally be added to the Code Injection Header rather than a Code Block. To do this, go to Settings > Advanced > Code Injection > Header. As this is a tracker that will track visitors to the website, don't forget to inform website visitors about this in your Privacy Policy 🙂 Did this help? Please give feedback by clicking an icon below ⬇️ Edited January 11 by paul2009 Improve your online store with our extensions.About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. Content: Links in my posts may refer to SF Digital products or may be affiliate links.Buy me a coffee Link to comment
Andrew_w Posted January 9 Author Share Posted January 9 Hi Paul, thanks so much for your response. Unfortunately, this doesn't seem to work for me either. I entered the code into the code injection header as you suggest, then saved, logged out and opened incognito....still nothing displayed. I actually just want it to appear on one page (https://www.simplehonours.co.nz/study-cb) rather than the whole site, so I tried entering the code via the Advanced Page Settings just for that page and this didn't work either. I'm wondering if the only way to do this is to somehow view the webpage as HTML code and then add my little bit of code just above the closing header tag. But I'm not sure how to do this, and I don't think Squarespace likes me playing around with the coding as I'm not an advanced user. Any other advice would be greatly appreciated. Link to comment
paul2009 Posted January 9 Share Posted January 9 (edited) On 1/9/2023 at 7:32 AM, Andrew_w said: Unfortunately, this doesn't seem to work for me either. I entered the code into the code injection header as you suggest, then saved, logged out and opened incognito....still nothing displayed. I tested the code myself on a test site and it worked fine so this is probably due to settings on your site that conflict with the third party code. Note that personal billing plans won’t support this code but if you are on a business plan or above, please add the code and I’ll take a look to see why it isn’t working in your site specifically. You can use the site-wide or per-page injection area depending on whether you want it to appear on one page or all pages. On 1/9/2023 at 7:32 AM, Andrew_w said: I'm wondering if the only way to do this is to somehow view the webpage as HTML code and then add my little bit of code just above the closing header tag. On Squarespace, the code injection option is how you achieve this. Edited January 11 by paul2009 Improve your online store with our extensions.About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. Content: Links in my posts may refer to SF Digital products or may be affiliate links.Buy me a coffee Link to comment
Andrew_w Posted January 9 Author Share Posted January 9 Thanks. I'm on a Commerce Basic plan, so that should work I believe. I've added the code via code injection for the whole site. See what you think. Thanks again. Link to comment
Andrew_w Posted January 11 Author Share Posted January 11 Hi Paul, I just wanted to check that you don’t need anything else from me to inspect the code? No rush obviously, but I thought I should check in case I’d missed something or not provided enough info 🙂. Regards. Link to comment
Solution paul2009 Posted January 11 Solution Share Posted January 11 (edited) On 1/9/2023 at 7:48 AM, Andrew_w said: I've added the code via code injection for the whole site. I just wanted to check that you don’t need anything else from me to inspect the code? The code appears to have been added three times, so if you've added it to the per-page injection and the site injection and the code block, you'll want to remove two of them. After doing that, you should be able to make the remaining trust badge visible by adding this to Design > Custom CSS: #cbBadge { z-index: 12; } This is necessary as the embedded code is using the same class as a built-in Squarespace class, causing the badge to be hidden in a layer underneath the header content. Did this help? Please give feedback by clicking an icon below ⬇️ Edited January 11 by paul2009 Andrew_w 1 Improve your online store with our extensions.About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. Content: Links in my posts may refer to SF Digital products or may be affiliate links.Buy me a coffee Link to comment
Andrew_w Posted January 12 Author Share Posted January 12 Hi Paul, Thank you! This has solved the problem. You've been a massive help, thanks once again. Regards paul2009 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment