Author Topic: Unable to add code snippet into head  (Read 2424 times)

Offline cookie2363

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Unable to add code snippet into head
« on: November 15, 2019, 10:04:57 AM »
Hi all,
I want to add Trustpilot code snippet to the <head> element of the site but I can't seem to get anywhere.
Could someone please point me in the right direction. I Need to add the following code ( this is an example code, the actual code has my intregration key.)

<script>
(function(w,d,s,r,n){w.TrustpilotObject=n;w[n]=w[n]||function(){(w[n].q=w
[n].q||[]).push(arguments)};a=d.createElement(s);a.async=1;a.src=r;a.type
='text/java'+s;f=d.getElementsByTagName(s)[0];f.parentNode.insertBefore(a
,f)})(window,document,'script','://invitejs.trustpilot.com/tp.min.js
', 'tp');
tp('register', '#KEY#');
</script>

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: Unable to add code snippet into head
« Reply #1 on: November 18, 2019, 12:25:10 AM »
Hello.
Create HTML block and insert it to the header or header_top section in Layouts
https://abantecart.atlassian.net/wiki/spaces/AD/pages/12419073/HTML+Block

Offline cookie2363

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Unable to add code snippet into head
« Reply #2 on: November 20, 2019, 02:10:46 PM »
When I do this it and click save the page redirects to "The page you requested cannot be found." and it doesn't save.
The script is Java so I'm thinking the system doesn't like this?

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: Unable to add code snippet into head
« Reply #3 on: November 21, 2019, 05:31:57 AM »
Hello.
Possible that this is server configuration issue related to mod_security php module https://abantecart.atlassian.net/wiki/spaces/AD/pages/3604484/Mod+security+403+406+error

 

Powered by SMFPacks Social Login Mod