Create and configure a GA4 Google analytics property for SoftMeter

SoftMeter is a Google Analytics client for desktop software (Windows and macOS) that does not rely on the Google Analytics SDKs. With SoftMeter you can monitor the usage of your software application, in the same way as you monitor the visitors to your website.

Google is stopping the Universal analytics properties in July 2023. So you will need to create a GA4 new type of property.

This blog explains how to create and configure a GA4 property to use it with SoftMeter. SoftMeter from version 2 supports the new GA4 type of Google Analytics properties, but more work is being done to enable all features of SoftMeter to operate with GA4.

Create the new GA4 property

Login to Google Analytics, go to Admin (last menu item on the left), and under the 2nd column click on "+ Create property".

Give a property name, and select your timezone.

If you want to monitor more than one desktop app, we suggest that you create one property for each app.

GA creates by default a GA4 type of property.

Fill in the 2nd page of details and press Create.

The new property is created. On the left, you can see the Admin menu for this property.

You will arrive at the Data streams page, where you are asked to Choose a platform.

GA4 property admin page

Create your data stream

Select Web as the type of stream.

Fill in the website URL (any URL will do), as the Stream name put your application's name + " stream" and click on Create.

Select the manual install tab.

The next page will show you your measurement ID (your GA tracking ID) which you will need to provide to SoftMeter, together with the API secret of GA4.

Use the Measurement ID and API secret in your application

In your application, call SoftMeter using your Measurement ID and your API secret.

call the function setOptions():

setOptions("ApiSecret=Your-Api-Secret-As-given-from-GA-administration-config");

call the function start():

start(appName, appVersion, appLicense, appEdition, MeasurementID, userGaveConsent);

Compile and run your application and you should start seeing the calls in the GA4 real-time report.

Change the retention period

The default is 2 months but you can change it to 14 months. Go to Admin -> Data settings -> Data retention.

how to configure GA data retention for desktop software monitoring

Ignore internal traffic

While you are implementing SoftMeter into your application, turn off the filtering of internal traffic.

Go to Admin -> Data settings -> Data filters, and switch the Internal traffic filter to Inactive.

GA4 property exclude internal traffic

SoftMeter PRO developer?

SoftMeter PRO edition sends the Application and System metadata to GA4 as custom dimensions.

The medadata are sent under the User scope and have names that start with "sm_".

The list of metadata sent is the following:

Dimension name Description Scope User Property / Parameter
App edition Provided by SoftMeter PRO User sm_AppEdition
App license Provided by SoftMeter PRO User sm_AppLicense
App name Provided by SoftMeter PRO User sm_AppName
App version Provided by SoftMeter PRO User sm_AppVersion
CPU cores Provided by SoftMeter PRO User sm_CPUcores
CPU model Provided by SoftMeter PRO User sm_CPUmodel
Operating system Provided by SoftMeter PRO User sm_OS
Operating system with version Provided by SoftMeter PRO User sm_OSwithVersion
RAM free Provided by SoftMeter PRO User sm_RAMfree
RAM installed Provided by SoftMeter PRO User sm_RAMinstalled
Screen resolution Provided by SoftMeter PRO User sm_ScreenResolution
User language Provided by SoftMeter PRO User sm_UserLanguage

To see this information in the GA4 reports you will need to first register these custom dimensions on the GA4 admin section.

We recommend that you first run your application (with SoftMeter) and start creating the custom dimensions after 24 hours. This will allow Google Analytics to prefill in the drop-down list "User property" and you will be able to pick values instead of typing them.

Go to Admin -> Custom definitions -> and click Create custom definitions to create them one by one.

GA4 custom definitions

In the form, first, select User as the scope, then filter the list of available dimensions by "sm_" and select the custom dimension, giving it also a name.

GA4 create custom dimension

At the end you will have a list of custom dimensions like the following:

GA4 list of custom dimensions under User scope

It can take 24 or more hours for Google Analytics to make these new custom fields available to your reports.

 

Add new comment