In the following help article, we will walk through the setup for Google Analytics 4 (GA4) tracking on your Blackcart checkout. Before you go through the steps in this article it is important that you first set up your Google Tag Manager (GTM) account for Blackcart checkout. If you haven’t already set this up, please see this article first.
How to find your GA4 tracking ID
The first step is to find your GA4 tracking ID so that it can be added to your GTM container. The easiest place to find your GA4 is by logging into your Google Analytics account.
- Sign in to your Google Analytics account.
- Click Admin
- At the top of the Property column, select your property.
- In the Property column, click Data streams.
- Click the data stream for your store
- Your "G-" ID appears in the top right.
While retrieving your tracking ID please also verify that Enhanced Measurement is turned on.
How to add your GA4 tracking ID to your GTM container
Now that you have your tracking ID, you can add this to your GTM container
- Sign in to your Google Tag Manager account.
- Open the container you have configured for Blackcart checkout.
- Click Folders and look for the BC IDs and Variables folder.
- Within this folder click on the BC ID - Google Analytics GA4 variable.
- Set the value of this variable to the tracking ID.
After your tracking ID is set you will need to enable the GA4 purchase and page view tags.
- Click on Tags.
- Filter for BC - Google Analytics GA4. The pageview and purchase events should be returned.
- Unpause each of these tags.
In the GTM container, you will also notice a GA4 refund tag from Blackcart. If you are receiving refund events for your non-Blackcart orders you can unpause this tag as well. After making these necessary changes, you can submit and publish them to activate event tracking from Blackcart checkout in your GA4 platform. This will allow you to monitor important user actions on your site, and gain valuable insights that can help you optimize your e-commerce business.
How to test your GA4 tags
To verify that you have successfully set up your GA4 tag you can use Google Tag Manager’s preview mode.
- Sign in to your Google Tag Manager account
- Open the container where you have imported the Blackcart configuration
- Click Preview
- Paste your storefront URL and click connect
- In the preview window of your storefront, add a TBYB to your cart and go to Blackcart checkout
- Sign in to your Google Analytics account
- Click Admin
- In the Property column click Debugview
- Here you should see the Blackcart page view events. You can click on the page view event to see the data from the event
How to add Blackcart checkout to your unwanted referral list
If you aren’t using a vanity domain for Blackcart checkout, it is important that you add Blackcart checkout (checkout.blackcart.com) to your unwanted referral list in GA4. Without properly excluding Blackcart checkout from your referral traffic, you may misattribute conversions to the wrong source or not be able to see what sources are driving conversions at all.
Here are the steps to add Blackcart checkout to your unwanted referral list in GA4:
- In Admin, click Data Streams in the Property column.
- Click Web and then click a web data stream.
- In the web stream details, click Configure tag settings (at the bottom).
- In the Settings section, click Show all to see all available settings.
- Click List unwanted referrals.
- Under Include referrals that match ANY of the following conditions:
- Select “Referral domain contains” for the match type
- Under Domain, enter checkout.blackcart.com
- Click Save
Importing Blackcart Purchase Events from GA4 into your Google Ads Account
If you are using Google Ads, you will also want to ensure that Blackcart purchase events are being registered by Google Ads. One way to do this is by importing the purchase event from your GA4 account. To do this you will first need to link your GA4 account to your Google Ads account. More info here. Once your GA4 account has been linked, you will need to:
- Sign in to your Google Ads account.
- In the top right, click Tools and Settings.
- Go to Measurement > Conversions.
- In the top left, click + New conversion action.
- Click Import, select Google Analytics 4 properties, then click Continue.
- Select the Blackcart purchase event, then click Import and continue.
- Click Done.