Adding Scripts to Your Site

If you’re wanting to add third-party scripts to your Carrot website, we have an option that’ll allow you to easily do that without ever having to touch the code on your website. Certain 3rd party services, require that you add a script to your website or to certain pages on your site. Some examples are:

Most of the time, these tools will be site-wide tools, meaning they will be activated on every page of your site. However there are certain cases where tracking scripts can be specific to one page, such as the Google AdWords Event Snippet tracking script. Lets dive into how to install these below!

Note: You’ll need to visit your site in an incognito window to ensure your script is working. This guide specifically covers the addition of scripts that are not considered to be on-page content, and won’t be shown to visitors/leads. These are typically used for tracking, split testing, analytics, or live chat integrations. For instructions on installing a script on-page such as a Calendly Widget or Google Reviews widget, please refer to this guide here.

Part 1: Site-Wide Scripts

Step 1: Go to your site’s dashboard

Screenshot on 24-May-16 at 14.35.39

Step 2: Open your site’s “Settings”

Screenshot on 24-May-16 at 14.40.06

Step 3: Click “Analytics & Scripts”

From there, you’ll see three options for scripts.

Google Analytics Tracking ID: This is the first entry space. It is only used for your GA4 Measurement ID. After adding it, you’ll save this using the green “save” button directly below that box.

Additional Sitewide Tracking Scripts: There are two additional sitewide tracking scripts, Head and Footer. Unless indicated by the third-party software, you will always use the second “Footer scripts” option to add scripts to your site. This ensures you have the optimal load speed for your site so your visitors don’t wait too long. Click the green save button located below “Footer scripts” to save the header and/or footer scripts you are adding.

Note: If the script provider says to install the script before the opening <body> tag on your site, you will add it to the “Head Scripts” box. If the script provider says to install the script after the opening <body> tag on your site, you will add it to the “Footer Scripts” box!

screenshot-on-10-12-2016-at-10-47-41-am

Step 4: Save Your Changes

Save after it’s entered and you’re finished!


Part 2: Page-Specific Scripts

As mentioned in the introduction of this guide, tracking, conversion and split testing scripts can be added to singular pages also. This portion covers how to add a script to a specific page. Scripts added to this box are added as a “footer script”, meaning they will be added after the opening <body> tag of your webpage.

To add a script to a specific page:

  1. In your Content > Pages Section, edit a page
  2. Scroll down to the “Additional Settings” box
  3. Paste the script in the “Tracking Codes” field
  4. Update the page

screenshot-on-10-12-2016-at-10-51-13-am

And that’s it! You’ve successfully installed a script on your site!


Learn More About 3rd Party Tools & Scripts