Fix kit B: measurement

Reporting should carry on through the move, and the logo customizer, the store's most distinctive feature, should be countable. This kit does both without an app release.

01

What is missing

On 13 October the store carried no Google tag; the pixels present were Mailchimp, Judge.me, Shopify.

Three measurement IDs on the old site are not on the store: CallRail, G-L0NH6ZFLR1, G-PSBSPNTX9L.

The customizer's twelve script files, 6,751 lines in all, held zero analytics calls.

The first step is yours and needs no code: connect the Google & YouTube channel in Shopify to the existing GA4 property, so years of history stay in one place and the standard shop events start flowing.

02

The eight events

eight
EventFires whenParameters
customizer_login_prompt_clickA guest clicks the button that leads to loginproduct_handle
customizer_openThe logo window opensproduct_handle
logo_uploadAn upload finishes or failsok, file_type, size_bucket
placement_selectA logo is placed in a zoneview, decoration_method
preview_generateA preview is requestedok, duration_bucket
customized_add_to_cartA customized item reaches the cartproduct_handle, placements, decoration_method
pdf_readyThe instruction PDF is readynone
customizer_errorA customizer request failsendpoint, status

No event carries a customer ID, an email, a logo file name, a logo URL or a PDF URL. In GA4, customized_add_to_cart becomes a key event.

03

How the script works

A small theme script loads after the customizer. It waits a few seconds for the customizer to appear, then wraps its public functions: each wrapper calls the original, returns its result untouched, and publishes one event. If a function is missing, the script does nothing and never throws.

A custom pixel subscribes to the eight events and forwards them to GA4. It runs only with analytics consent.

In the long run these events belong inside the extension itself. The theme script is the version that can ship without waiting for an app release.

04

Test evidence

Tested by unit tests alone, against a stand-in for the customizer with the same function names: each event fires once per action with only its listed parameters, results and errors pass through unchanged, the script stays under two kilobytes compressed, and on a page without the customizer it does nothing.

Proof on a Shopify development store with GA4 DebugView is the next step. Nothing is installed on your store.

05

The login-link fix

The button a guest sees builds its login link by adding a second question mark to an address that already has one, so the return path is swallowed into another parameter and the shopper lands somewhere else after logging in. That cause is an inference from the markup.

StateLink
Seen/account/login?region_country=US?return_to=/products/…
Fixed/account/login?region_country=US&return_to=%2Fproducts%2F…

The kit fixes it twice: once in the template, and once as a small guard script that repairs the link in the page. Four cases are tested. No login was attempted on your store, so what happens after login is not tested.

06

What installing it needs from you

  • A decision on the GA4 property and on call tracking.
  • Theme access for one script file and one template change, made on a duplicate theme first.
  • Admin access to add the custom pixel and set its consent permission.
  • Half an hour in GA4 to mark the key event and register three custom dimensions.