Learn business growth with Google Analytics 4 › Forums › Google Analytics 4 › Troubleshooting Custom Dimension in Google Analytics with gtag set() Method › Reply To: Troubleshooting Custom Dimension in Google Analytics with gtag set() Method
-
Based on the information you’ve provided, it seems like the
set
function may not be effectively transmitting thechain_id
with your events. To troubleshoot the issue, you could try using Google Tag Manager’sField To Set
feature to set thechain_id
for your GA4 configuration. This would equate to callinggtag('config','{Your GA4 ID}', { 'chain_id': 'Test chain id' });
in your code. Then, when calling theevent
in your code, try something like this:gtag('event','click', { 'send_to': '{Your GA4 ID}' });
. This might help ensure that thechain_id
is consistently being sent with your events. Do note, however, that you’d need to replace{Your GA4 ID}
with your actual Google Analytics 4 ID in the above examples.