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

  • Elijah

    Member
    11 March 2023 at 2:45 am

    Based on the information you’ve provided, it seems like the set function may not be effectively transmitting the chain_id with your events. To troubleshoot the issue, you could try using Google Tag Manager’s Field To Set feature to set the chain_id for your GA4 configuration. This would equate to calling gtag('config','{Your GA4 ID}', { 'chain_id': 'Test chain id' }); in your code. Then, when calling the event in your code, try something like this: gtag('event','click', { 'send_to': '{Your GA4 ID}' });. This might help ensure that the chain_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.