|
/ Knowledge Base /Integrations/ How to Track Custom Events with Google Tag Manager

How to Track Custom Events with Google Tag Manager

In this article, we’ll guide you through the process of sending tracking events from your SureCart store to Google Analytics using Google Tag Manager (GTM).

To connect SureCart with Google Analytics, you can use the Google Site Kit plugin on your WordPress site.

It’s an easy way to see the analytics directly within the WordPress admin area to get your SureCart store connected with Google Analytics and Google Tag Manager.

After you’ve installed the Google Site Kit plugin, you can activate it on your SureCart site by simply following the instructions on your screen.

After you have installed and activated the Google Site Kit plugin, you will be able to see the analytics data related to Add to Cart and Purchase Event.

But if you want to track additional events like remove from cart, checkout completed, checkout initiated and more, you have to send custom events to Google Tag Manager,

In this article, we’ll help you understand how you can send custom events to Google Tag Manager from your SureCart store.

Why Connect SureCart with Facebook Pixel & Google Analytics?

Connecting SureCart with Facebook Pixel (FB Pixel) and Google Analytics (GA) is a great way to track your e-commerce sales and marketing performance. Both tools offer powerful features that can help you understand your customers better and make better business decisions.

With Facebook Pixel, you can track website visitors and their interactions with your Facebook ads. For example, you can see how many people clicked on your ad and added products to their cart, but didn’t make a purchase.

You can use this information to create more targeted ads, measure the effectiveness of your campaigns, and optimize your ads.

Whereas, Google Analytics provides insights into your website traffic, visitors’ locations, purchase behaviors (if you’re running Google Ads), etc. You can use this information to improve your website’s performance, identify new marketing opportunities, and optimize your overall business strategy.

Events That Can Be Tracked

SureCart automatically broadcasts the “Add To Cart” and “Purchase” events for Google Analytics. This means that if you want to track these events, you just need to install the Google Site Kit plugin on your WordPress. No additional configuration is needed.

If you want to track additional events like “Add Payment Info” to gain more insights, you can use custom code to do that, and we’ll explain how.

Here’s a list of additional events you can broadcast through a custom code:

EventEvent NameDescription
scAddedToCartAdded to CartTriggered when a customer adds an item to their shopping cart.
scRemovedFromCartRemoved from CartTriggered when a customer removes an item from their shopping cart.
scViewedCartViewed CartTriggered when a customer views their shopping cart.
scProductViewedProduct ViewedTriggered when a customer views a product page.
scCheckoutInitiatedCheckout InitiatedTriggered when a customer begins the checkout process.
scCheckoutCompletedCheckout CompletedTriggered when a customer successfully completes the checkout process and finalizes their purchase.
scShippingInfoAddedShipping Info AddedTriggered when a customer adds or updates their shipping information during checkout.
scPaymentInfoAddedPayment Info AddedTriggered when a customer adds or updates their payment information during checkout.
scTrialStartedTrial StartedTriggered when a customer starts a free trial for a subscription-based product.
scSubscriptionStartedSubscription StartedTriggered when a customer starts a paid subscription for a product.

How to Connect SureCart Store to Google Analytics

If you did not connect your Google Analytics account with the Google Site Kit plugin upon installation, then you can follow the steps below.

  • In the Site Kit setup wizard, you’ll have an option to connect to Google Analytics. Click on the Connect Service button for Google Analytics.
  • Follow the prompts to grant permission to access your Google Analytics account.
  • Choose the Google Analytics property (website) you want to link to your WordPress site.
  • Click Configure Analytics to finish the setup. Google Site Kit will now integrate with Google Analytics.

How to Connect SureCart Store to Google Tag Manager

Once Google Analytics is connected to your Google Site plugin, go back to the Site Kit dashboard by clicking on Dashboard in the left-hand menu under Site Kit.

  • From the Settings, Navigate to Connect More Services.
  • Locate Tag Manager in the list of services and click on it.
  • Follow the prompts to grant permission to access your Google Tag Manager account.
  • Select the Google Tag Manager container you want to use with your WordPress site.
  • Click Configure Tag Manager to finish the setup.

After completing these steps, you should see a dashboard within Google Site Kit that displays information about your website’s performance, including data from Google Analytics and Google Tag Manager.

You’ve now successfully added Google Site Kit to your WordPress website and connected it to Google Tag Manager as well.

From here, you will need to “forward” any events from Google Tag Manager to GA4. To do this add a new “Tag” to your workspace:

Then select your existing Google Analytics GA4 Pageview configuration tag, then {{Event}} for the Event name:

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

E-Commerce Store Launch Checklist Download
Scroll to Top