Connect Google Analytics
WePay can send your Google Analytics account all the pageviews and user events associated with your App. This will allow you to monitor your payment funnel.
Provide your Google Analytics Account ID
In order for us to propagate analytics data, we need your Google Analytics Account ID.
You can enter your Google Analytics Account ID via the /app/modify call using the gaq_domains
parameter. To make the /app/modify call, you’ll need your client_secret
, which you can find on your dashboard.
API Call:
- PHP
- cURL
- Ruby
- Python
Monitor user payment funnels
If you’re a platform or marketplace and you’re creating accounts for your users, you can also send us their Google Analytics Account IDs, so they can monitor their own individual payment funnels. Just send us the Google Analytics Account IDs during the /account/create call (or /account/modify call) using the gaq_domains
parameter.
Response:
- JSON
Events you’ll receive
Your Google Analytics account will be sent all pageviews associated with your app, plus the following events from the “WePay Payment” events category:
Event | Description |
---|---|
api checkout - iframe/onsite - start |
Fired when a user enters the payment flow - differentiates between iframe and onsite |
api preapproval - iframe/onsite - start |
Fired when preapproval state changes to 'start' - differentiates between iframe and onsite |
{object type} - iframe - start |
Fired when object state changes to 'start' - checkout, preapproval, withdrawal or account |
payment flow - iframe/onsite - error |
Fired when a user sees an error - differentiates between iframe and onsite. Includes error message. |
payment flow - onsite - switched from iframe |
Fired when a user goes from the iframe to www.wepay.com to complete their payment (either because they chose to pay with a saved payment method or we could not set cookies within the iframe) |