Track links from Constant Contact campaign using Google Tag Manager and Google Analytics

This is a high-level example of how to use Google Tag Manager to track “events” in Google Analytics, correlated to a Constant Contact campaign.

See also: https://heuristicsolutions.atlassian.net/wiki/spaces/DOCS/pages/3185180870 and https://heuristicsolutions.atlassian.net/wiki/spaces/DOCS/pages/3209560080

Overview

This document demonstrates how to configure a Constant Contact campaign that sends an email containing a link to LearningBuilder. Google Tag Manager is then used to track custom “events”, which are recorded in Google Analytics and correlated with that campaign.

For example, you can create an email campaign that encourages prospective licensees to register with LearningBuilder, and then track how many begin the registration process.

Prerequisites:

1. Create the Campaign in Google Analytics

Technically, you don’t need to “create” anything in Google Analytics up front. However, in order for GA to recognize a campaign, the inbound links into LearningBuilder must include a specific set of querystring parameters that GA looks for.

1

Create the LearningBuilder tracking URL

Use the Google Analytics Campaign URL Builder tool to construct the tracking URL.

Using the Campaign URL Builder from https://ga-dev-tools.web.app

2. Configure Google Tag Manager to track events

GTM can provide a great deal of sophisticated tracking options, but most of those features are beyond the scope of this document. For this example we show how to use GTM to push a custom event into Google Analytics when a user clicks a specific button.

This example records an “event” in Google Analytics when a registration button in LearningBuilder is clicked. This is a simplistic example, you are free to use whatever Tags and Triggers you would like in GTM.

1

Add a Tag

In the Tag Manager, interface add a new “GA4 Event” tag

Adding a Tag in GTM
2

Add a Trigger

In this example, we’re recording a GA “event” when the Submit button on a specific LearningBuilder registration form is clicked.

The configuration looks like this:

The specific trigger configuration will depend heavily on what you’re trying to do and how your LearningBuilder instance is configured.

Generally speaking, in a production setup it’s better to do a page-based trigger (based on URL) than a “Click” trigger because it’s less likely to be affected by future changes to a page’s HTML coding.

3

Publish your changes

Make sure you publish your changes in Tag Manager when finished, or else they won’t actually take effect.

3. Constant Contact configuration

A detailed explanation of Constant Contact is beyond the scope of this document, but the key steps are:

1

Create a new Campaign

In Constant Contact → Campaigns, create a new Email campaign.

2

Somewhere in your content, configure a link to LearningBuilder. Use the tracking URL you generated in step 1.

3

Send the email

Send or schedule the email. (Actually populating your mailing list is outside the scope of this document)

4. Test it out

1

Using either a “live” email, or a Constant Contact preview, follow the link to LearningBuilder. This link will contain the tracking parameters for Google Analytics.

2

Register for an account

Since this example is tracking registrations, register for a new account in LearningBuilder. The Google Tag Manager setup will be listening for a click on the “Submit” button

3

Check the Google Analytics reports

It may take 24 hours for the data to become available, but you should be able to run an Events report in GA, and your registration should be tied to the Campaign you identified in the tracking URL.