Analytics and other code injections

Limecube has features to allow you to integrate your website with various codes such as Google Analytics, other tracking platforms, chatbots, live chat and other types of scripts.

This feature allows you to add your code in one place, to work with all pages across your site.

This feature is for when you are trying to add any kind of code to the > head tag, body tag, end of body tag, or footer tag.
Very important: Make sure you copy the complete code over when adding into Limecube. Only adding partial code can break your pages.

Integrate Google Analytics code with your website

Before you go live or as soon as possible after, it is a great idea to setup some kind of Analytics code to help generate reports so you can monitor how your website is doing.

These instructions are for adding GA4 (Google Analytics) tracking code to your website.

  1. Sign up for a Google Analytics account here.
  2. Find and copy your unique Google Analytics tracking ID
  3. Go to More >  'SEO Manager' on the top menu in admin.
  4. The 2nd tab on the left will be 'Analytics and code injection'
  5. Add your Google Analytics tracking ID in the 'Before </head>' field.
  6. Activate it
  7. Save

This video below shows you where to do that, and shows Google Analytics code being inserted:

Adding other codes

If the code you are trying to add needs to be placed into the head tag, body tag, end of body tag, or footer tag, these instructions  are for you. Examples of other code could be Chatbots and Live Chat, 3rd party forms and surveys, Social Media Integration, custom css, 

  1. Find and copy your code
  2. Go to More >  'SEO Manager' on the top menu in admin.
  3. The 2nd tab on the left will be 'Analytics and code injection'.
  4. Add your code in the field noted in your codes instructions.
  5. Activate it
  6. Save

This video below shows you and example of how to do that:

What the different fields are for

Before </head>

Typically this area is used for Google Analytics or Google Tag Manager. Other tracking may also ask you to place your code in the head tag.

Please test very carefully after inserting to the site as incorrect code can break the site.
Find out more about Google Analytics (GA)
Find out more about Google Tag Manager (GTM)


After <body>

This opening body tag is often (but not only) used for Google Tag Manager.

Please test very carefully after inserting to the site as incorrect code can break the site.


Before </body>

This end body tag should be used where the instructions you have been given say to place the code before your </body> or at thate end of your body tag.

Please test very carefully after inserting to the site as incorrect code can break the site.

Various Analytics

While reference above has been made to Google's code only, most types of analytics outside of Google can be inserted into these 2 fields.


Facebook Pixel

This section assumes you already have a Facebook Pixel setup. If you don't yet, click here to find out.

If you wish to insert the Facebook Pixel:

  1. Go to 'SEO Manager' on the Header menu.
  2. The first tab on the left will be 'Tracking code'
  3. Add your Facebook Pixel tracking ID in the head tag field.
  4. Save

Other scripts

Here are some other types of scripts that are frequently used in this code injection page:

  • Chatbots
  • Remarketing tag (Google Ads)
  • Google Tag Containers (GTM)
  • Call tracking scripts
  • Facebook Pixels
  • Heatmaps
  • Third-Party widget scripts (E.g. Live Chat, Chatbots, MailChimp, HubSpot, Calculators, Calendly)
Each provider will have instructions on their website on where to place their script.

Step-by-step

  1. Find and Copy your script/code from the 3rd party provider
  2. Go to More >  'SEO Manager' on the top menu in admin.
  3. The first tab on the left will be 'Tracking code'
  4. Add your script/code into one of the 3 options provided, as per the 3rd party providers instructions.
  5. Save

Refer to the video above on how to insert the script to the relevant section if you are not sure based on these written instructions.

WhatsApp integration

This WhatsApp code below should be pasted into the Before </body> section of the 'Analytics and code injection' tab.

Look for the 'Replace with your WhatsApp number' part of the code below and add your number in. It should include the country code before it, but do not include +.

To add a floating WhatsApp button to your website, copy and paste the code below (make sure to carefully copy/paste all of it as not fully using all the code may break your website):

<!-- WhatsApp Floating Button CSS -->
<style>
.whatsapp-float-button {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #25D366;
border-radius: 50%;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
width: 60px;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
z-index: 9999;
}

.whatsapp-float-button img {
width: 35px;
height: 35px;
}
</style>

<!-- WhatsApp Floating Button HTML -->
<div class="whatsapp-float-button" id="whatsappButton">
<img src="https://upload.wikimedia.org/wikipedia/commons/6/6b/WhatsApp.svg" alt="WhatsApp Icon">
</div>

<!-- WhatsApp Floating Button JavaScript -->
<script>
document.getElementById('whatsappButton').addEventListener('click', function () {
const phoneNumber = '10000000000'; // Replace with your WhatsApp number (e.g. "61234567890")
const message = 'Hello! I would like to chat with you.';
const whatsappUrl = `https://api.whatsapp.com/send?phone=${phoneNumber}&text=${encodeURIComponent(message)}`;

window.open(whatsappUrl, '_blank');
});
</script>

Testing: You'll know this is functioning correctly as you'll see a floating icon on the bottom right corner of your website that looks like the icon below. Once that is showing, make sure to click on it to see if it connects to your phone number properly.

Can't find the answer you are looking for?

Try using searching below: