Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
How to update global custom user properties in Google Analytics 4 [GA4]?

With Google Analytics 4 [GA4] it's possible to add custom user properties to each event.

  1. Optional: Add any custom user properties that you'd like to configure in User Properties.

This is explained further in [GA4] About event parameters.

Now, this code works fine and the value of test is appended to the initial page_view and other following events:

gtag('config', 'G-1234567890', {
  test: false
});

Our site is a single page application (SPA) and at some point we want to update the parameter test.

The mentioned docs and also the Global site tag API reference set say, these parameters can be updated at any time. I found these two versions:

gtag('set', 'user_properties', {test: true});
gtag('set', {test: true});

Unfortunately, both won't work. I can get the updated parameter successfully using get:

gtag('get', 'G-1234567890', 'test', (test) => {
  console.log(test); // true
});

But the value is never updated for any subsequent request to Google Analytics and test: false is tracked all the time.

What are we doing wrong?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!