Google Analytics (GA4)
Loop’s Google Analytics 4 integration allows you to track the recurring order transactions of subscriptions along with your non-subscription transactions and thus providing a complete picture of your store revenues in your main GA4 account.
Server-side integration avoiding the need to add Google tag manager or any tracking scripts separately for the Loop app.
For every event sent on GA4, we add the Shopify customer id as the user id which helps in linking different subscription order events to a common customer.
We only send transaction data for recurring orders and not the origin order generated from Shopify checkout preventing duplication of the same order.
If you are just getting started, then we recommend to read this **Google help doc** to help you understand how GA4 works and how to get migrated from Universal Analytics to GA4.
Types of events
Connecting GA4 account to Loop
Need help?
Recurring order successful transactions
Payment failed events
Subscription life-cycle events
Whenever a recurring order billing is attempted, we send out GA4 events having the products, price, quantity, tax, shipping information related to the order.
loop_order_processed
loop_order_partially_processed
Whenever a recurring charge attempted from Loop fails, we send out GA4 events having the subscription_id, value, failure_reason information related to the order.
loop_payment_attempt_failed_with_retries_left
loop_payment_attempt_failed_last_retry_left
loop_payment_attempt_failed
Along with the transaction events, we also send important subscription events which can help you in analysing your store subscriptions performance.
loop_subscription_created
loop_subscription_paused
loop_subscription_resumed
loop_subscription_cancelled
loop_subscription_reactivated
loop_subscription_expired
loop_order_skipped
loop_order_out_of_stock
To connect your Google Analytics 4 account, you would need to obtain “api_secret” and “measurement_id”.
api_secret:
API secret key generated in GA4 account required to enable additional events to be sent into a specific data steam from an external server.
To create a new API secret, navigate to Admin > Data Streams > choose your stream > Measurement Protocol > Create
measurement_id:
Measurement ID associated with a specific data stream in GA4.
It can be found under Admin > Data Streams > choose your stream > Measurement ID
Click on the admin icon (at the bottom) and select relevant account and GA4 property to connect over to Loop. Then click on the "Data Streams" option.
Choose one of the data streams in which you would want to receive the Loop events. If no stream added yet, click "Add stream" to add one and choose the "Web" option.
When you click on a data stream, you would be able to see Stream details bar on top of the drawer. The left most option will be showing the Measurement ID of the stream as highlighted in the screenshot below. Copy and paste this value in the Measurement ID field of Loop Set up instructions page.
Click on the "**Measurement Protocol API**" secrets option as highlighted in the screenshot below.
If you have not generated any API secrets yet, it is highly likely that Google would want you to acknowledge the terms before creating an API secret. In that case, click on the "**Review terms**" button and acknowledge the terms.
Once you acknowledged the terms, you would be able to see "Create" button. Click it to create a new API Secret.
Choose a name for the API secret, preferably "Loop subscriptions" for future reference.
Once, you click on "Create" button, you would be able to see the newly generated API secret. Copy and paste this value in the API Secret field of Loop Set up instructions page.
There is no need to worry. We are here to assist you. Please contact us at support@loopwork.co or feel free to reach out to us through the chat by clicking on the support beacon located at the bottom right corner.
Regards,
Loop Subscription Team 🙂
Key Features
Server-side integration avoiding the need to add Google tag manager or any tracking scripts separately for the Loop app.
For every event sent on GA4, we add the Shopify customer id as the user id which helps in linking different subscription order events to a common customer.
We only send transaction data for recurring orders and not the origin order generated from Shopify checkout preventing duplication of the same order.
If you are just getting started, then we recommend to read this **Google help doc** to help you understand how GA4 works and how to get migrated from Universal Analytics to GA4.
Contents of the article
Types of events
Connecting GA4 account to Loop
Need help?
Types of events
Recurring order successful transactions
Payment failed events
Subscription life-cycle events
Recurring order successful transactions
Whenever a recurring order billing is attempted, we send out GA4 events having the products, price, quantity, tax, shipping information related to the order.
loop_order_processed
loop_order_partially_processed
**Payment failed events**
Whenever a recurring charge attempted from Loop fails, we send out GA4 events having the subscription_id, value, failure_reason information related to the order.
loop_payment_attempt_failed_with_retries_left
loop_payment_attempt_failed_last_retry_left
loop_payment_attempt_failed
**Subscription life-cycle events**
Along with the transaction events, we also send important subscription events which can help you in analysing your store subscriptions performance.
loop_subscription_created
loop_subscription_paused
loop_subscription_resumed
loop_subscription_cancelled
loop_subscription_reactivated
loop_subscription_expired
loop_order_skipped
loop_order_out_of_stock
Connecting GA4 account to Loop
To connect your Google Analytics 4 account, you would need to obtain “api_secret” and “measurement_id”.
api_secret:
API secret key generated in GA4 account required to enable additional events to be sent into a specific data steam from an external server.
To create a new API secret, navigate to Admin > Data Streams > choose your stream > Measurement Protocol > Create
measurement_id:
Measurement ID associated with a specific data stream in GA4.
It can be found under Admin > Data Streams > choose your stream > Measurement ID
Steps to look up API Secret and Measurement ID
Click on the admin icon (at the bottom) and select relevant account and GA4 property to connect over to Loop. Then click on the "Data Streams" option.
Choose one of the data streams in which you would want to receive the Loop events. If no stream added yet, click "Add stream" to add one and choose the "Web" option.
When you click on a data stream, you would be able to see Stream details bar on top of the drawer. The left most option will be showing the Measurement ID of the stream as highlighted in the screenshot below. Copy and paste this value in the Measurement ID field of Loop Set up instructions page.
Click on the "**Measurement Protocol API**" secrets option as highlighted in the screenshot below.
If you have not generated any API secrets yet, it is highly likely that Google would want you to acknowledge the terms before creating an API secret. In that case, click on the "**Review terms**" button and acknowledge the terms.
Once you acknowledged the terms, you would be able to see "Create" button. Click it to create a new API Secret.
Choose a name for the API secret, preferably "Loop subscriptions" for future reference.
Once, you click on "Create" button, you would be able to see the newly generated API secret. Copy and paste this value in the API Secret field of Loop Set up instructions page.
Still Need help?
There is no need to worry. We are here to assist you. Please contact us at support@loopwork.co or feel free to reach out to us through the chat by clicking on the support beacon located at the bottom right corner.
Regards,
Loop Subscription Team 🙂
Updated on: 04/07/2024
Thank you!