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');