Universal Analytics (UA) will be deprecated on July 1, 2023, which means it will stop processing data. Analytics 360 properties will stop working on October 1, 2023. Migrate to Google Analytics 4.

Set persistent values with gtag.js

Stay organized with collections Save and categorize content based on your preferences.

To set values that will be sent with every event for a web page, update the config for your property with the values that you want to send.

For example, if all transactions on your site use the same currency, add the currency parameter to your config command, instead of specifying the currency in every single event.

gtag('config', 'MEASUREMENT_ID', {'page_title': 'Travel Destinations'});

You can set multiple parameters in a config command. For example, the following code sets the currency and country parameters at the same time.

gtag('config', 'MEASUREMENT_ID', {
  'page_title': 'Travel Destinations',
  'currency': 'USD'
});

If you configure multiple properties on a single page, it may be more efficient to use the set command.

gtag('set', {
  'page_title': 'Travel Destinations',
  'currency': 'USD'
});
gtag('config', 'MEASUREMENT_ID_1');
gtag('config', 'MEASUREMENT_ID_2');
gtag('config', 'MEASUREMENT_ID_3');