Google Analytics
This guide applies only when selling pre-orders through Purple Dot's own checkout. Pre-orders sold through the Shopify checkout benefit from the same tracking as your regular sales.
If you have enabled Google Analytics tracking on the Integration settings page in the Merchant Portal, the Purple Dot checkout automatically sends certain events to Google Analytics 4 via the Measurement Protocol.
What you need before you start
A Google Analytics 4 property for the store
The GA4 Google tag active on the storefront (for example via the Google & YouTube Shopify app, Google Tag Manager, or a theme tag), with the
_gacookie being set for visitorsAdmin (Editor) access to the merchant’s Google Analytics property
Prerequisites
Before connecting Purple Dot, the GA4 tag must already be running on the Shopify storefront. Purple Dot will not send any server-side events for a session where it cannot find the browser _ga cookie that GA4 sets (this is used as the Measurement Protocol client_id).
Use the same Measurement ID everywhere. The Measurement ID you enter in Purple Dot must match the GA4 web data stream already collecting storefront browser events. If these don’t match, connection tests may pass but production checkout events won’t stitch to the correct sessions.
Step 1 - Install the Google & YouTube app on Shopify
In Shopify Admin, go to Settings → Apps and sales channels (or open the Google & YouTube app on the Shopify App Store).
Install Google & YouTube (by Google LLC).
Open the app and sign in with the Google account that has access to the merchant’s Google Analytics property.
Connect the Shopify store to the correct Google account / Analytics property.
When prompted, set up or connect a Google Analytics 4 property and web data stream. Use the same Measurement ID you plan to use for Measurement Protocol and Purple Dot.
Complete the app setup and confirm the Google tag is connected and active on the storefront.
Use the same Measurement ID everywhere. The Measurement ID you enter in Purple Dot must match the GA4 web data stream connected in the Google & YouTube app and shown in Google Analytics. If these don’t match, connection tests may pass but production events will go to the wrong property—or checkout events won’t attribute correctly.
Verify the tag is working on the storefront
In Shopify Admin, go to Settings → Customer events
Verify the app is “Connected”
On the Google & YouTube app, click “Test”

Accept any cookie consent banner that covers analytics cookies.
Confirm events are being processed
In GA4, open Reports → Realtime and confirm storefront page views are arriving.
Step 2 - Find the Measurement ID and create an API Secret
Find the Measurement ID
Open Google Analytics.
Go to Admin → Data streams.
Open the Web data stream used on the storefront.
Copy the Measurement ID (format
G-XXXXXXXX).
Use this value in Purple Dot’s Measurement ID field.

Create a Measurement Protocol API Secret
Stay on the same data stream.
Open Measurement Protocol API secrets.
Click Create, give it a nickname such as
Purple Dot, and create the secret.Copy the Secret value immediately and store it securely.
This secret is what Purple Dot calls API Secret.
You must have Editor (or higher) permission on the GA4 property to create API secrets.

Step 3 - Add credentials in Purple Dot
Log in to the Purple Dot Merchant Portal.
Go to Settings → Integrations.
Under Analytics, click Connect for Google Analytics.
In the Google Analytics connection modal, enter:
Field
Value
Measurement ID
Measurement ID from Step 2
API Secret
API Secret from Step 2
Click Save.
After the connection is saved, Purple Dot sends real server events automatically when a Google Analytics connection exists for the store.
Add to cart
add_to_cart
Initiate checkout
begin_checkout
Add payment info
add_payment_info
Pre-order created
purchase
Events include ecommerce fields such as currency, value, and items. Purchase events also include a transaction_id (the Purple Dot pre-order / checkout id). When available, Purple Dot also forwards session_id (from the _ga_ session cookie) and Google click identifiers (gclid / gbraid / wbraid) so server events can attribute correctly.
Step 4 - Verify the connection
There are two ways to verify the integration. Use Option A for a quick credential check, Option B to test the full checkout flow end-to-end.
Option A - Test Connection in the modal (recommended for first setup)
In the Google Analytics connection modal, fill in Measurement ID and API Secret.
Click Test Connection (bottom-left of the modal).
Wait for “Credentials verified!”
Purple Dot sends a dedicated validation event to Google’s Measurement Protocol debug endpoint:
Event name:
purple_dot_testClient ID:
555.555
This confirms the Measurement ID and API Secret are accepted by Google. The debug endpoint validates the payload; it is not the same as a storefront checkout event.
Option B - Test via live checkout (end-to-end)
This option verifies the full integration: storefront → Purple Dot checkout → GA4 Measurement Protocol → Realtime reporting.
Open the storefront and accept cookie consent so the
_gacookie is set.In GA4, open Reports → Realtime (keep this tab open).
Complete a test pre-order/checkout flow (add to cart, open checkout, enter payment details, complete the order).
In Realtime, confirm the checkout events appear — for example
add_to_cart,begin_checkout,add_payment_info, andpurchase.
Tip: Server events are only sent when Purple Dot can read a GA4
client_idfrom the storefront_gacookie. If Realtime stays empty after a test checkout, re-check cookie consent and that the Measurement ID in Purple Dot matches the storefront data stream.
Last updated