Best practices for events and event data in a GA custom pixel?

Hey all,

I’m curious if there’s any consensus or best practices on what Shopify / GA events (and data) a store should ideally be tracking?

Shopify’s code example is a great starting point for what events to track. But I’m less confident about the data.

The custom pixel example in the above doc collects a considerable amount of data in each event and I’m not sure how useful that data really is in the context of GA. For example, the suggested ‘checkout_started’ event collects the following:

    timestamp: event.timestamp,
    id: event.id,
    token: event.data?.checkout?.token,
    url: event.context.document.location.href,
    client_id: event.clientId,
    email: event.data?.checkout?.email,
    phone: event.data?.checkout?.phone,
    first_name: event.data?.checkout?.shippingAddress?.firstName,
    last_name: event.data?.checkout?.shippingAddress?.lastName,
    address1: event.data?.checkout?.shippingAddress?.address1,
    address2: event.data?.checkout?.shippingAddress?.address2,
    city: event.data?.checkout?.shippingAddress?.city,
    country: event.data?.checkout?.shippingAddress?.country,
    countryCode: event.data?.checkout?.shippingAddress?.countryCode,
    province: event.data?.checkout?.shippingAddress?.province,
    provinceCode: event.data?.checkout?.shippingAddress?.provinceCode,
    zip: event.data?.checkout?.shippingAddress?.zip,
    orderId: event.data?.checkout?.order?.id,
    currency: event.data?.checkout?.currencyCode,
    subtotal: event.data?.checkout?.subtotalPrice?.amount,
    shipping: event.data?.checkout?.shippingLine?.price?.amount,
    value: event.data?.checkout?.totalPrice?.amount,
    tax: event.data?.checkout?.totalTax?.amount,

Is all of that really useful in GA?

Shopify’s own checkout_started event doc custom pixel example lists a much more modest collection of data: total price, discount codes, first item, and first item discounted value.

Some online marketing experts have generously shared their custom pixel code online. Two in particular that I found do not bother with two events (‘checkout_address_info_submitted’ and ‘checkout_contact_info_submitted’) and they collect significantly less data for each event.

Who to trust?

The pressure is very high to get this right. I understand it’ll be a matter of working with each store. But I’d like to come into the conversation with some understanding of what’s genuinely useful and what others are doing.

Do any of you have any guidance or suggestions please? Are there any best practices?

Many thanks

It really depends on what you are doing analytics wise. Most tags only want the start event with the modest data. The other touches Google and others may want as “interacted with” shipping, payments and finally purchase.

all of the extra interactions between “begin and purchase” could never get interactions in the case where logged-in or shop-pay, etc… which would not trigger them at all and “skip over” them

It really just depends on what you want to report on your checkout funnel.

Hey folks :waving_hand: - @zamartz is on point here, it does generally come down to what data you’re trying to track analytics-wise, but if reliability/dimensionality was a concern, one other tool you could use would be webhook subscriptions like checkouts/create or checkouts/update.

These would have to be set up via a GraphQL Admin API-enabled up, but you could combine using Pixels as your customer behaviour tracking funnel and then compare that data against webhook data to confirm checkout creation if needed as sort of reconciliation process. You could even set up subscriptions to the orders/paid webhook topic if you wanted to get a bit more granular.

Hope this helps - just wanted to share this as another recommendation!