Google Analytics (GA4) Quick-Start Guide

Start sending Confection data to Google Analytics (GA4) with a few simple steps.

Issues? Questions? Feedback? Leave a comment. Already have a Confection account? Already installed Confection on your site or app? Skip to step four. New to Confection? Learn more here.

Get Started

Step One

If you haven’t already, create a Confection account. If you already have a Confection account, log in.

Continue to Step 2

Step Two

Click “My Account” (or “Set Up My Account” if you’re accessing your account for the first time). Enter your contact information, the domain(s) on which you want to use Confection, and select one of our two data storage options. Then, click “Save Changes.”

Continue to Step 3

Step Three

Click "Install Confection" (If you're accessing your account for the first time, this will be the default screen.) Select your preferred langauge, CMS, platform, or framework to download the relevant scripts.

At this point, use the relevant language, framework, CMS, or platform quick start guide to get Confection up and running on your site or app. Then, continue with step four.

Continue to Step 4

Step Four

We suggest you create a unique Google Analytics property for Confection. This will prevent duplicate data from entering your existing property and will allow you to compare Google Analytics native data with Confection data.

a. Create a Dedicated Google Analytics Property

To create a unique Google Analytics property for Confection, follow the "Create a property" section of these instructions and/or the video below. To differentiate it from your other properties, give this property a name like "Confection Enabled." And make sure you copy the new property tracking ID. It will look like this: G-1A2B03CD4E

b. Create a Measurement Protocol API Secret Key

Create a Measurement Protocol API Secret Key for your new GA4 data stream by following the steps in the video below. Make sure you copy the key for the next step.

c. Set Up Your Confection Integration

Next, click "Integrations" in your Confection account. Then, click "New Integration," and select "Analytics to GA4."

Enter your new, Confection-enabled property ID in the top field (eg., G-1A2B03CD4E). Enter your Measurement Protocol API secret key in the lower field. Then, click "Create".

On the next screen, select whether or not you want to send all events -- including any custom events -- to Google Analytics or just pageview and purchase events. By default, Confection won't link custom events with pageviews. For example, if you have a "Click" event attached to a button, we'll just send the raw interaction count to GA4. If you'd like to see where an event occurred, select the "Link Events and Pageviews" option.

If you'd like to send Confection UUIDs to GA4 as platform user IDs, click "Submit Custom UUID as User ID to GA4 when available." When active, Confection will send a user's most recent UUID to GA4. This will allow you to group metrics using Confection UUIDs and group multiple visits under one specific identifier.

Enrichment Add-On

Send the names of companies who visit your site and visitor geolocation information to GA4 by activating Confection's enrichment add on. To do so, schedule a call with our team. To learn more about the add-on, see this blog post.

Once the add-on is active, select "Send Geolocation information as custom events" to begin sending company and geolocation data to GA4. GA4 doesn't allow integrations to submit geolocation data so Confection will send this information as a custom event. Confection will send company data to GA4 as a cutom event named Company.

Next, click "Update" and, finally, "Activate Integration." Your site or app will begin sending data to Google Analytics immediately.


d. (Optional) "I entered more than one (sub)domain in the 'Set Up Your Confection Integration' step. Each has its own Google Analytics property."

If you've added two or more (sub)domains to your Confection account -- test.com and sub.anotherdomain.com, for example -- and each has its own Google Analytics property, you'll want to do one last thing. Otherwise, the Confection Google Analytics integration will write all your data to all your properties (ie., you'll see test.com data in sub.anotherdomain.com's Google Analytics property and vice versa).

In the upper right corner of the Confection GA4 integration screen, you'll see a box labeled "Filter Type." Under "Reporting Domain," enter the top-level domain (eg., mydomain.com) or subdomain (eg., sub.mydomain.com) you'd like to associate with this Analytics property.

For example, if you only want to write data from mydomain.com to this Google Analytics property, enter mydomain.com in the input field. Then, click "Update" (and, if you haven't already, "Activate Integration").

That's it. You're done.

You can manage your integrations by returning to the integrations screen. Just click "Integrations" in the admin menu. Then, click any integration in the list to pause or update it.

Additional Information

UTM/Referrer, IP, Language, and Browser Agent Info

There's no documented way to send UTM/referrer, IP, language, or browser agent info to GA4 from an integration like ours. This means the following kinds of reports will be blank in your Confection-enabled GA4 property: acquisition, device (mobile/desktop/browser), geolocation, and network/ISP. You'll just see pageview and campaign information, including bot activity. (Learn more about this feature here.)

Note, this is not a Confection limitation. That information will still be available in your Confection account API.

We have two workarounds for this:

First, you can select "Send additional information as custom events" in your Confection integration dashboard. With this toggled on, we'll write the following to your GA4 property as custom events: UTM/referrer, language, and browser agent. We will not send IP information as this would violate the GA4 terms of service.

After toggling on this option in your Confection dashboard, you'll want to do one additional thing in GA4. This will allow you to visualize and report on custom event values (that is, the Source Name portion of this event / value pair: utm_source = Source Name).

Visit your GA4 admin screen, and click "Custom Definitions." Click "Create custom dimensions." Give the custom dimension a name and description. These can be whatever labels are meaningful to you. Make sure you select "Event" under "Scope" and "value" under "Event parameter."

Once this is done, you'll be able to add this custom dimension to exploration reports. Note, it can take up to 24 hours for the custom dimension to (a) appear as a dimension option and (b) for associated values to appear in reports.

After this delay, visit the reporting screen. Click the plus sign (+) beside "Dimensions" and search for the name you created on the custom dimension editor ("Event Parameter" in the video). Then, add this dimension to your report as a row.

If you'd like more granular control, we recommend using our Zapier, Pipedream, Make, or Tray.io integration to send this information to GA4 as custom events.

In either case, you can use this custom Confection event data to build your own GA4 exploration reports.

Use Custom Event Data in GA4 Reports

To use custom events in virtually any GA4 report, create a segment or audience limited by one or more key events.

For example, you might create a segment of users and sessions that include the utm_campaign event name and the yourCampaignName value. You can do this in the "Explore" screen.

If you'd rather create a custom audience, you can do that in the property admin. Click the cog in the lower left corner of the screen. Then, in the center "Property" column, click "Audiences."

You can find more documentation on creating GA4 segments and audiences here.

Once you've created your segment and/or audience, you'll be able to use it in just about any GA4 report.

Use Confection + Google Analytics to Enrich Google Ads Campaigns

Once you've started writing data to Google Analytics, you can easily use that session intelligence to enrich Google Ad campaigns. For more information, see this Google guide.

There are two other ways to do the same thing. You can use your Confection-enriched BigQuery dataset and this Google guide.

If you want more granular level control, you can also use Confection's lowcode/nocode integrations at Zapier, Pipedream, Make, and Tray.io.


“I have some questions.”

Next Steps

Install & Integrate Elsewhere

Find Other Quick-Start Guides

"I have some questions."

Contact Us

"I want to see this."

Share It

Discussion

Questions or comments about using Confection with Google Analytics (GA4)? Leave them below.

"Please contact me. I have some questions."

You can also use the chat app in the lower right corner.