How do I install the Blue Green Analytics script on my site?

The script allows Blue Green Analytics to monitor your site traffic. To capture customer journeys across web and landing pages, you must install your unique script just before the closing body tag on all site pages.

In its simplest form, all you need to do is copy and paste the script onto the pages of your site, just before the closing body tag.

Copying your Blue Green Analytics script

  1. In your Blue Green Analytics account, click on the Account settings icon in the left-side navigation.
  2. Select The Script.
  3. Click Copy script.

Installing the script on your website

  1. Paste the code before the closing </body> tag in the HTML for each page of your site.

Most tag and content management systems allow code to be deployed across a number of pages by placing the code in a single location (e.g. a footer HTML file that applies across an entire domain). If you’re feeling unsure, check with your developers on how this script should be implemented.

 

If you’re using a tag or content management system, the sections below may be helpful.

In this article: Google Tag Manager, HubSpot, Shopify, Wix, Squarespace, WordPress

 

Installing the script using Google Tag Manager

  1. Follow the steps above to locate and copy your Blue Green Analytics script.
  2. Log in to your Google Tag Manager account and select the relevant container.
  3. In the left sidebar menu, navigate to Tags and click New.
  4. In the top left, give your tag a name. (“Blue Green Analytics” will do the trick!)
  5. Click Tag Configuration and select Custom HTML as the tag type.
  6. Paste the script in the HTML field.
  7. Below Tag Configuration, click Triggering and select All Pages for the tag to fire on all pages with the Google Tag Manager code installed.
  8. Click Save.
  9. In the upper right, click Submit, then Publish, to push the updated container live.

Installing the script on HubSpot

  1. Follow the steps above to locate and copy your Blue Green Analytics script.
  2. Log in to your HubSpot account.
  3. Click on the Settings icon in the main navigation bar.
  4. In the left sidebar menu, navigate to Website, then select Pages.
  5. At the top of the page, under Choose a domain to edit its settings, select the relevant domain / subdomain that coincides with your Blue Green Analytics account.
  6. In the Site footer HTML section, paste the Blue Green Analytics script
  7. In the bottom left, click Save.

If you have multiple subdomains set up in your HubSpot account (e.g. www.domain.com and blog.domain.com), follow the steps above for each subdomain.

To add the script to all HubSpot hosted pages in your account, under Choose a domain to edit its settings, select Default settings for all domains.

Installing the script on Shopify

  1. Follow the steps above to locate and copy your Blue Green Analytics script.
  2. Log in to your Shopify admin dashboard.
  3. In the left sidebar menu, navigate to Online Store, then select Themes.
  4. Click the Actions dropdown menu and select Edit code.
  5. Select the theme.liquid file for your theme.
  6. Paste your Blue Green Analytics script just before the </body> tag in this file.
  7. In the upper right, click Save.

Installing the script on Wix

  1. Follow the steps above to locate and copy your Blue Green Analytics script.
  2. Navigate to Settings from your site's dashboard.
  3. In the left sidebar menu, select Tracking & Analytics.
  4. Click + New Tool and then Custom.
  5. Paste the script in the Paste code snippet here field.
  6. Give the new tool a name ("Blue Green Analytics" will do the trick!).
  7. Under Add Code to Pages select All pages and use the dropdown menu to select Load code on each new page.
  8. Under Place Code in section, select Body - end.
  9. Click Apply to save your changes.

Installing the script on Squarespace

  1. Follow the steps above to locate and copy your Blue Green Analytics script.
  2. Log in to your Squarespace account.
  3. In the left sidebar menu, navigate to Settings.
  4. In the Website section of the menu, navigate to Advanced, then select Code Injection.
  5. Paste the script into the Footer field.
  6. In the upper left, click Save.

Installing the script on WordPress

  1. Follow the steps above to locate and copy your Blue Green Analytics script.
  2. Log in to your WordPress account.
  3. Install and activate the Insert Headers and Footers plugin.
  4. Once activated, navigate to Settings, then Insert Headers and Footers.
  5. Paste the script in the Scripts in Footer section and select Save.

Verifying script deployment

Once the script is installed, data should start flowing into your account about 10-15 minutes after the first page view. We recommend installing the script, taking a coffee or lunch break, then logging in to confirm that all is right in the world.

If you’re having any trouble, please reach out to us at support@bluegreenanalytics.com.

Best Practices

  • We recommend always placing the Blue Green Analytics script immediately before the </body> tag.
  • When copy and pasting the script, verify that it does not contain altered characters that can sometimes be introduced by the clipboard (e.g. typographer’s quotes vs. HTML-required straight quotes).

Note

The script, alone, is not able to track single-page applications. While we’re working on documentation for this use case, please reach out to our team at support@bluegreenanalytics.com, and we’ll be happy to advise on the appropriate approach for tracking single-page applications with Blue Green Analytics.