Google Analytics 4

Google Analytics 4 (GA4) tracking code can be added to any of your surveys.

First, you will need to obtain the Tracking ID from your Universal Analytics Admin page. The Tracking ID starts with "UA-". If you are using Google Analytics 4, you will need to obtain a Measurement ID, which begins with "G-" instead. The tracking code must contain these IDs for Google Analytics to send data to specific accounts and resources.

  1. Google Analytics 4: Obtain the Measurement ID

(The following steps are based on the GA4 demonstration account provided by Google, the data is for reference only.)

After entering the Google Analytics Admin page, click on Data Streams under Data collection and modification, and click on the resource to be streamed to find the Measurement ID formatted as G-XXXXXXX!

  1. Embed the Measurement ID in the survey

Next, log in to SurveyCake and open the questionnaire where you want to embed the tracking code. On the Build page, click the Integration button at the bottom of the left sidebar to reveal the Google Analytics 4 field. Open this field, enter your Measurement ID, and click Save to complete the setup.

Open Google Analytics 4
Enter Measurement ID and click Save

FAQ

My survey has been embedded with GA4 Measurement ID, and I have received response data in the SurveyCake admin. However, why is there no data displayed on GA4?

Since GA4 data typically takes several hours or up to a day to be reflected in the reporting, the official data won't immediately appear on GA4.

If you want to confirm whether the GA4 Measurement ID is successfully tracking, it is recommended to fill out the survey and submit it. Then, check the "Events" section in the "Realtime" report to see if both SurveyCakeSubmit (Survey Submission) and SurveyCakeVisit (Visit Survey) events are received. If they are, it means the tracking code has been successfully embedded. After waiting for a few hours, this data will also appear in the "Events" section of the "Engagement" report in GA4.

Check the "Events" section in the "Realtime" report of GA4 to see if the SurveyCakeSubmit and SurveyCakeVisit events are appearing.

Assuming that you also do not see any data in the "Realtime" report, it could be due to one of the following reasons:

The GA4 resource report you are currently viewing is different from the GA4 resource set up in your survey.

Please confirm the resource you are currently viewing in GA4 and double-check if the Measurement ID for this resource is the same as the tracking code embedded in your survey.

Your browser has specific plugins blocking GA4 tracking (e.g., Ad blocker).

It is recommended to fill out the survey and submit it using an incognito tab (incognito mode by default doesn't enable any plugins). This helps test whether data is received in GA4. If you see data in GA4 after using incognito mode, it indicates that your browser plugins may be affecting the tracking, preventing data from being recorded. In this case, simply disabling the functionality of the plugins should resolve the issue.

If I embed the same GA4 tracking code in two different surveys, how can I distinguish the data for the two surveys in GA4?

You can navigate to the "Engagement" report, specifically the "Pages and Screens" page. Differentiate and view the SurveyCakeSubmit and SurveyCakeVisit event counts for different surveys based on the survey titles. This allows you to distinguish and analyze the data for each survey using the same GA4 tracking code.

Summary
It's OK if you don't know anything about tracking code. SurveyCake makes it easy to track surveys!

Master advanced
survey skills now!

Learn More
Can't find the answer you're looking for?