Google Analytics (GA4) Quick-Start Guide
Start sending Confection data to Google Analytics (GA4) with a few simple steps.
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.”
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.
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.
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:
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.
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.
Next, click "Update" and, finally, "Activate Integration." Your site or app will begin sending data to Google Analytics immediately.
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.
Questions or comments about using Confection with Google Analytics (GA4)? Leave them below.
You can also use the chat app in the lower right corner.