Building URLs for Keap/Infusionsoft Email Campaigns and Newsletters

If you've installed our AnalyticsConnect.io software that automatically posts sales data from Keap/Infusionsoft into Google Analytics Ecommerce and you're sending out email, newsletters, and/or email campaigns from Keap/Infusionsoft, you'll want to read this page to learn how to build web links that can be properly tracked inside of Google Analytics so you can see specifically which emails triggered which website visits, conversion goals, and sales.

Basic Example

Let's start with a simple example... You're going to send out a one-time email to everyone on your email list inside Keap/Infusionsoft. You're going to tell your list about a new blog post you just published and the goal is to get them to click on the link to the blog post. That email may look something like the following.

I just posted a new blog post about red widgets.  Click on the link below to read it.

http://www.example.com/blog/red-widgets

We'll take that link and paste it into the Google Analytics URL Builder as the "Target URL". Set "Campaign Source" to "infusionsoft". Set "Campaign Medium" to "email". Set "Campaign Name" to "blog-post-red-widgets" (note that adding "blog-post-" to the beginning of the campaign name is done so you can easily identify which campaigns were blog posts inside your Google Analytics reports). Leave "Campaign Content" blank (we'll talk about this option a little later).

You can test the link by clicking on it and watching the result inside Google Analytics. First things first, be sure that when you click on the link your browser actually loads the page correctly. To see what this is doing inside Google Analytics, open your Google Analytics account and look for the presence of the source/medium/campaign that you used in the link.

Now just replace the link in your email broadcast with the new link we just created, which will look something like the following. (NOTE: You may need to scroll the example window to see all of the code)

I just posted a new blog post about red widgets.  Click on the link below to read it.

http://www.example.com/blog/red-widgets?utm_source=infusionsoft&utm_medium=email&utm_campaign=blog-post-red-widgets

And now our link is long and ugly... Let's fix that. If your message is being sent as plaintext there isn't much we can do, but you should be sending all of your email from Keap/Infusionsoft as HTML with a plaintext version that gets used only if the user's email client can't read the HTML version of the email (which almost never happens anymore).

So we take the plaintext version above and create an HTML version like this.

<p>I just posted a new blog post about red widgets.  Click on the link below to read it.</p>

<p><a href="http://www.example.com/blog/red-widgets?utm_source=infusionsoft&utm_medium=email&utm_campaign=blog-post-red-widgets">http://www.example.com/blog/red-widgets</a></p>

Now when a user sees the link, they see the short version, but when they click on it all of the campaign parameters we added are present.

So how are things different inside Google Analytics after a user clicks this and continues on your website? Everything they do (goals, purchases, etc) will be tagged with this campaign as the source. If a user reads the Red Widgets blog post, and then buys something, your Google Analytics Ecommerce reports will show the "blog-post-red-widgets" campaign as the traffic source for the sale. You'll figure out what type of blog content pulls in sales and what doesn't fast. Then you tweak your blog content, publishing more of what sells. Remember, it's NOT about traffic, it's about making sales.

Distinguishing Between Different Links with the Same URL

What if you're sending out an email to sell a book and the email has two call-to-action buttons and you want to track which one was clicked? That email may look something like the following.

<p>I just released a new book titled "Brown is the New Green."</p>

<a href="http://www.example.com/brown-green"><button>Buy Now</button></a>

<p>It's really good and I know you'll like it!</p>

<a href="http://www.example.com/brown-green"><button>Buy Now</button></a>

We'll take that link and paste it into the Google Analytics URL Builder as the "Target URL". Set "Campaign Source" to "infusionsoft". Set "Campaign Medium" to "email". Set "Campaign Name" to "broadcast-brown-green-book-announcement" (note that adding "broadcast-" to the beginning of the campaign name is done so you can easily identify which campaigns were broadcast emails inside your Google Analytics reports). As for setting "Campaign Content" you'll use "top" for the top link and "bottom" for the bottom link (we can keep it simple for now because we only have two links). This tells us where in the content the link was, and now inside of your Google Analytics reports you'll know which one was clicked. Here's what the HTML code for that email looks like now.

<p>I just released a new book titled "Brown is the New Green."</p>

<p><a href="http://www.example.com/brown-green?utm_source=infusionsoft&utm_medium=email&utm_campaign=broadcast-brown-green-book-announcement&utm_content=top"><button>Buy Now</button></a></p>

<p>It's really good and I know you'll like it!</p>

<p><a href="http://www.example.com/brown-green?utm_source=infusionsoft&utm_medium=email&utm_campaign=broadcast-brown-green-book-announcement&utm_content=bottom"><button>Buy Now</button></a></p>

Split Testing

Let's say that you've got some super big announcement that you want to send out to your email list. You just got your own TV show. You know you've only got one chance to break the news out in the best way you can. You had trouble sleeping last night because you just can't decide which subject line you should use... "Oh My God This Is Big News" or "Look Mom I'm On TV". Start off by dividing your list into three groups. Randomly select (with a tag inside Keap/Infusionsoft) two groups of 10% of your contacts and one group of 80%. So Group One is 10% of your list. Group Two is a different 10% of your list. Finally, Group Three is the remaining 80% of your list.

Create two versions of the email broadcast inside Keap/Infusionsoft, where we use "Oh My God This Is Big News" as the subject line of one and "Look Mom I'm On TV" as the subject line of the other. We will call these Version A and Version B (we'll be adding the "a" or "b" to the end of the campaign name). When you're building links inside the Google Analytics URL Builder, Set "Campaign Source" to "infusionsoft". Set "Campaign Medium" to "email". For Version Version A, set "Campaign Name" to "broadcast-tv-announcement-a". For Version Version B, set "Campaign Name" to "broadcast-tv-announcement-b".

NOTE: I used "a" and "b" in the above example to keep things simple. In actual use, you'll want to use something a little more meaningful that "a" and "b". It's best to use something short that actually describes the difference between the two, which will make reading the reports inside Google Analytics much, much easier than trying to remember which one was "a". In the above example, we could have used "subject-god" and "subject-mom". If we were split testing different background colors for the email, we may use something like "bkgrnd-red" and "bkgrnd-black".

Now fire off Version A of that email to Group One and Version B to Group Two (which is a combined total of 20% of your list). Then do some digging into your Google Analytics reports. Which version of the email brought in the most clicks? Which had a lower bounce rate? Did one version cause more goals like newsletter sign-ups to happen? Any resulting purchases? Once you've figured out which version gave you better results, send that version of the email to Group Three (the remaining 80% of your list).

Headers, Footers, and Sidebars

Smart marketers have learned that using an email template that includes a non-changing header, footer, and/or sidebar with links is a very good idea. Why? Simply because if you send secondary links out to enough people, a certain percentage of people will click on those links. As an example, if you email your list every time you publish a new blog post, and you include a link such as "Check Out My Book", a certain percentage of people will click on that link. You can think of it like this: If you're not adding these types of links to your email templates, you are literally throwing away traffic.

Okay, so how do we track these links inside Google Analytics? Let's use our Red Widgets blog post example from above. To remind you, here's the settings we used for the campaign tracking: Set "Campaign Source" to "infusionsoft". Set "Campaign Medium" to "email". Set "Campaign Name" to "blog-post-red-widgets".

Now we add one more parameter to the above and this is the "Campaign Content" parameter. You can think of "Campaign Content" as the sections of your email for the purposes of this example. Set anything in the body of the message to "body". You can then use "header", "footer", and "sidebar" for any of those sections that exist in your message.

This is IMPORTANT: Consistency in parameter names used! Because you have the ability to look at the "Campaign Content" parameter across multiple campaigns, you need to keep using the same name. If one month you use "header" for your top links, and another month you use "headers" (plural), you just broke your data. Do this correctly, with consistency of names used, and you'll be able to pull up a report showing all click activity from the "header" of all the email you sent for the last 3 months. Or maybe even more interesting, see how much ecommerce revenue those clicks got you.

Only tag links for your own website. If your footer has a link to your page on Facebook, do NOT add campaign parameters to it.

Newsletters

You can build your email newsletter with: Set "Campaign Source" to "infusionsoft". Set "Campaign Medium" to "email". Set "Campaign Name" to "newsletter-2015-06" (this is "newsletter" - "year" - "month", and optionally, if you do more than one newsletter in a month, you can add - "day" to the end)

For "Campaign Content", see above section on Headers, Footers, and Sidebars, if you have these sections. You're going to add one more very important section called "toc" which is for your newsletter's Table of Contents. Even though your newsletter has all of the content written inside of the newsletter you send them, you still add links at the top of that newsletter and these links point to a copy of that newsletter on your website. Why would someone click on a link to visit your website to see the exact same content that was already written inside of that newsletter? The answer is NOT does this make sense. The reality is that people will do this, so not including links that work this way is throwing away traffic. We do EVERYTHING we can to get as much traffic to our website as possible, so Google can see we're popular and give us the gift of even more traffic.

When you're building the website version of your newsletter, be sure to include anchors on your section headings. As an example, the code for Heading One may be <h2>Heading One<h2> which you'll change to <h2><a name="newsletter-2015-06-section-1"></a>Heading One<h2>. Be sure to increment "name" as you continue creating these, so Heading Two would be <h2><a name="newsletter-2015-06-section-2"></a>Heading Two<h2>. You can then call the page with the page scrolled to any specific section. This is important because if you have 23 sections in your newsletter and someone clicks on section 17, the page needs to automatically scroll showing them what they expect to see, rather than the top of the page. With those in place, a link like http://www.example.com/newsletter/January-2015 can be rewritten as http://www.example.com/newsletter/January-2015#newsletter-2015-06-section-17 and will take them directly to the section 17 heading.

Automation and Email Builders

If you're sending out a few emails a month, and each email only has a handful of links, adding campaign parameters for Google Analytics is manageable. If however, you're sending out a newsletter every two weeks with 15 sections and a few dozen links, writing the code for this will drive you insane, and you're almost guaranteed to make some mistakes. The solution is a newsletter building script. The basic idea is that you create a template for your newsletter. You then have a custom webpage that has forms that you load your content and links into. You click the "create" button and the newsletter builder script figures everything out and tags your links for you. You then simply paste the website version of your newsletter into your website, and the plaintext and HTML versions of the email into Keap/Infusionsoft. You can contact us if you are interested in having a custom solution like this built for you.

Related Resources

Google Analytics URL Builder

Building URLs for the Keap/Infusionsoft Affiliate System

Article Feedback

If anything here is incorrect, outdated, or omits critical information, please use our contact us form and let us know.