How To Track Lead Sources In Squarespace

By Daniel J. Murphy

Squarespace is becoming more popular as an entry-level CMS platform to launch your startup’s website. With simple yet powerful integrations for GoDaddy, MailChimp and many other popular startup products, Squarespace makes launching your initial website a quick and painless process. It’s also cheap ranging from $12 - 46 a month, has built in eCommerce (if you’re into that) and has a flexible framework.

Although simple, easy-to-use and overall convenient… Squarespace is seriously lacking with analytics and reports. But that’s okay because they also have a Google Analytics integration (meaning you can easily link your Google Analytics account to your Squarespace website).

But even with Google Analytics you still are missing out on some crucial marketing data points. One of those missing data points is the original source of leads. More specificly, I mean not being able to track the sources of leads that submit forms on your Squarespace website. Fortunately I was able to do some research and figure out how to embed tracking code within the Squarespace form so you can analyze lead sources.

Particularly in the early days of a startup, tracking where your sources are coming from is vital to scalable marketing efforts. If you’re going to start your website on Squarespace, here’s a workaround for analyzing lead sources on your website.


USING GOOGLE ANALYTICS EVENTS TO TRACK LEAD SOURCES

Google Analytics Events are very flexible. You can use JavaScript/JQuery to track your form submissions as Events in Google Analytics. I’m going to walk you through, step-by-step, how to embed some code into the <header> of each page that contains a form you want to track.

Step 1: Open Settings For Your Page

Once you’re logged into Squarespace navigate to the page you want to install the tracking.

Step 2: Select Your “Advanced” Settings

Step 3: Embed Event Tracking

This is the code you’ll want to embed in the Page Header Code Injection:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
var eventposted=0;

$(document).ready(function(){
    $('input.button').click(function() {
        window.setInterval(foo, 100);
    });
});

function foo(){
        if(($(".form-submission-text").is(':visible')) && (eventposted==0)){
           _gaq.push(['_trackEvent', 'EventNameHere', 'Submission']);
            eventposted=1;
        }
}
</script> 

The only part you’ll want to change is highlighted above. This is the Event Category, and you can name it whatever you’d like.

Here’s what mine looks like for this website:

image04.png

HOW TO TRACK LEADS IN GOOGLE ANALYTICS

After you’ve embedded your tracking code and received at least a couple form submissions, you should check Google Analytics to analyze the sources of those leads. Here’s how to do that:

Step 1: Find Events Within Google Analytics

Under the “Behavior” category in your left sidebar find “Events” and click “Overview.”

Step 2: Select The Event Category

In my example I used “ContactAStartupMarketer” as the event for form submissions on this website.

Step 3: Add A “Secondary Dimension”

Find the “Secondary dimension” dropdown menu and search for “Source / Medium.” With “Source / Medium” your Events will be grouped into the the original Source / Medium where the leads came from before they submitted a form on your website.

That’s it. Now you can do a lead source breakdown of your Squarespace form submissions without buying additional software or upgrading your CMS to something more sophisticated.

While this will let you evaluate all your channels, this method does not provide you with enough information to look up any contact’s original source. One workaround for finding a specific lead’s original source would be to check the timecode of the submission (easy to do if you use Squarespace’s integration with Google Sheets) and match that timecode to the event in Google Analytics. Of course this would depend on the frequency at which you are receiving form submissions. But that might work for you.

If you have another way to track sources in Squarespace or questions about this way, please comment below.


Additional Resources:

https://support.google.com/tagmanager/answer/6106716?hl=en

https://support.squarespace.com/hc/en-us/articles/206566737-Using-the-Form-Block