-
How can I track product images on Shopify product pages using Google Analytics 4 (GA4)?
Hey there, I’m still pretty new to Google Analytics 4 (GA4) and right now I’m going through the user guide for the Google API. So far, so good. I even managed to create a custom dimension.
Check out my code below:
const customDimensions = { 'ab_page_image': 'AB Image', } for (let p in customDimensions) { await analyticsAdminClient.createCustomDimension({ parent:
properties/<span class="hljs-subst">${propertyId}</span>
, customDimension: { scope: 'EVENT', parameterName: p, displayName: customDimensions[p], } }).catch(console.error) }It’s working fine so far, but I’m a bit unsure about how to tie my custom dimension (I called mine
ab_page_image
) into Shopify. Anyone know how I can make it so GA4 can pick up and return the value forab_page_image
?
Log in to reply.