Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom Code Not Working

Featured Replies

I've just added my Google Analytics code to the new "Add extra JavaScript to your pages" part of the custom code section, but it's not showing up on the website.

I've cleared the cache. Is there anything else I need to do or is this not working properly?

Can you take a screenshot of how you added it? I take it as you removed the extra script wrapper, right? Is it displaying in the front? You can share a url if you have it on a server

  • Author

@Nemo I just added the full code provided by Google Analytics which was:

No, it's not appearing in the front.

Right, the script tag must be removed, I guess we will implement a free html box as well, or parse the js one so that they are automatically removed

What you need to use is just this

<!–//–><![CDATA[//><!– (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,‘script’,‘https://www.google-analytics.com/analytics.js’,'ga’); ga(‘create’, ‘UA-xxxxxx-xx’, ‘auto’); ga(‘send’, ‘pageview’); //–><!]]>

  • Author

Thanks, but that didn't work either. I checked the Google Analytics code again and actually it should be like this:

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXXX-XX', 'auto'); ga('send', 'pageview');

So I put that in without any script tags and it still won't work.

You have to wait before google picks it up, try again tomorrow with the last you posted

  • Author

But it's not even in the source code when I view the page.

I just added the code manually to the footer.tpl and now it is working.

THat's very odd, we will have it checked. I take it as it's saving and retaining the value in the back office, correct? I wonder if someone accidentally broke the functionality in the front. Are you using the latest build or?

  • Author

Yes, it is saving and retaining the value. First of all it was displaying errors but as soon as I removed the script tags as you suggested, the errors disappeared. But the tracking code would never appear on the front.

I'm using 1.0.0

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.