How do I add tracking codes and tags to my website?

Posted by

When adding third party extras like Live Chat and Google Tag Manager, or utilising advanced data tracking (usually for marketing purposes) like Google Analytics, Salesforce tracking and other similar functionality, you're provided with code or a 'tag' to add to the website. 

Mintox allows you to easily add this code to every single page of your website, or in some cases, specific pages, depending on the code requirements.

IMPORTANT TIPS - Read these first if you've not done this before!

You'll need to know exactly where the code needs to be added - to which page(s) of the website, and to which elements. These instructions should be supplied by the third party whose code it is, e.g. Google, Facebook, Salesforce, Zopim. The instructions may be on their website, in an email they've sent you, or even in the code itself. If you cannot find the instructions, you'll need to contact them directly before going any further.

Website Configuration in Mintox

A web page is built of sections and some codes need to be added into only one specific section of a page.

  • Near the top of a web page is the Head element, which contains meta information about the page, and other instructions. This is a popular place to paste in various tracking codes.
  • Following the Head element is the Body element, which is where the bulk of the page content lives.
  • Web pages tend to be crawled and rendered top down, so for example, code at the bottom of the body will be rendered after code in the head.

Entering improper code into a section may cause unintended visual changes to the front end of your website. For example, if you were supplied 'code' but in fact it was two codes in one TXT file, with a normal text instruction in between the codes (ie. not code language), you may not notice and may simply paste in all of the TXT file. This would most likely result in the text instruction being visible on your website somewhere. If you're at all uncertain, we recommend you first consult with your web developer.

You can add comments to codes - and you may see some codes are supplied already with comments included. These are only visible in the code (ie. not on the front end of the website) and can be very useful. Comments are contained with punctuation like this: <!--Comment here-->

Always test your addition(s) once done. Once you've added code, test (or work with the relevant third party to test) that it is functioning as required. Better to check now then realise later!

Add code to every single page of your website

For example, Google Tag Manager or Google Analytics

  1. First identify where the code needs to go in the web page structure. In the head at the top, or near the start of the body element, or at the end of the body element.
  2. Go to Web Pages > Configuration and paste in the code to the relevant area.

Add code to a specific page of your website

  1. First identify which section of the web page the code needs to be added to (e.g. the head, the body).

Add code to the <body> section of a specific page of your website

  1. To add the code to the body of the page, find the page content in Mintox. 
    • For example, Web Pages > Find the page > Edit 
    • It might be a page not accessible via Web Pages, for instance a product category. In that instance, you would find it via Products > Manage Categories > Find your category > Edit.
  2. Once you are in edit mode of the relevant area, you should be able to switch the visual 'WYSIWYG' editor to Source code mode by clicking 'Source' in the toolbar (top left).
  3. Paste in your code at the top or bottom of the existing code.
  4. Save and close.
Category: Web Pages