Within our website, we have a unique dimension that is configured on Google Analytics and utilized when sending the page view event:
gtag('config', 'UA-TrackingCode', {
'custom_map': {
'dimension1': 'CustomDim'
},
'send_page_view': false
});
gtag('event', 'page_view', {
'CustomDim': value
});
However, implementing this code results in triggering a page view for all instances of Google Analytics loaded on the page prior to ours (resulting in inflated bounce rates for others). I am seeking a solution to ensure that this page view event only gets registered for my 'UA-TrackingCode' instance.
Is there a method to achieve this? Perhaps something along the lines of:
gtag('event', 'UA-page_view', {
'CustomDim': value,
'TrackingCode': 'UA-TrackingCode'
});