Integration with analytics platforms

How it works

Connecting Google Analytics and Facebook Pixel in your Publisher Account will allow you to track events happening in Pay Station when users interact with it.

You can track the following events:

Google Analytics

CategoryActionDescriptionLabel
paystationopen-{state_name}Opening a page in the payment UI.-
paystationclick-email-submitSending an email from any page. The name of the page is passed in 'label'.state
paystationclick-btn-shareClicking the button to share via a social network. The social network name is passed in 'label'.name
paystationclick-btn-payClicking the Pay Now button on the billing data entry form.payment_method_name
paystationclick-btn-return-urlClicking the Return to Store/Start again button.status
paystationchoose-payment-widgetClicking on the payment method widget. The widget name is passed in 'label'.name
paystationchoose-methodSelecting the payment method. The payment method name is passed in 'label'.name
paystationchange-status-doneChanging the payment status.
If the user closes the payment UI or leaves the page, and then the status changes, the event message is sent.
state

Custom dimensions for Google Analytics

DimensionNameDescription
1versionPay Station version.
2purchase_invoice_idPayment invoice ID in the Xsolla system.
3external_idPayment invoice ID in the partner’s system.
4purchase_skuSKU of the purchased item.
5total_sumTotal purchase amount. All fees are included.
6total_sum_currencyTotal purchase amount currency.
7pidID of the payment system.
8projectIdProject ID.
9countryPayment country.
10projectNameName of the project.
12purchase_sku_digitalContentSKU of the purchased game keys package.

Facebook Analytics

EventDescription
open-{state_name}Opening a page in the payment UI. The state name is passed in 'parameters'.
click-email-submitSending an email from the status page. The state name is passed in 'parameters'.
click-btn-shareClicking the button to share via a social network. The social network name is passed in 'parameters'.
click-btn-payClicking the Pay Now button on the billing data entry form. The payment method name is passed in 'parameters'.
click-btn-return-urlClicking the Return to Store/Start again button. The status name is passed in 'parameters'.
choose-payment-widgetClicking on the payment method widget. The widget name is passed in 'parameters'.
choose-methodSelecting the payment method. The payment method name is passed in 'parameters'.
change-status-{status_name}Changing the payment status.
If the user closes the payment UI or leaves the page, and then the status changes, the event message is not sent.

Who can use it

Partners who have already integrated Pay Station and set up at least one account: Google Analytics or Facebook Ads/Facebook Analytics.

How to get it

To integrate the analytics platform:

  1. Go to your Publisher Account > Pay Station > Settings.
  2. Select Google Analytics/Facebook Pixel from the Apps section.
  3. Insert your tracking ID and click Connect.

When you integrate Google Analytics and Facebook Pixel, the correspondent events will be sent to your Google Analytics and Facebook Analytics accounts.

You can find these events in:

Payment UI events

Payment interface events are processed via the postMessage mechanism when opening Pay Station in an iframe or with Pay Station Embed.

EventDescription
show-error-pageDisplaying an error. The error text is passed in 'value'.
open-{state_name}Opening a page in the payment UI.
create-invoiceCreating an invoice on Xsolla's side.
close-widgetClosing the payment UI.
click-email-submitSending an email from the status page.
click-custom-package-continueClicking the Continue button when buying an arbitrary amount of virtual currency.
click-commentClicking the button to post a comment.
click-buy-packageClicking the Buy Package button when buying a package of virtual currency.
click-buy-gift-packageClicking the button when buying a package of virtual currency as a gift.
click-buy-gift-custom-packageClicking the button when buying an arbitrary amount of virtual currency as a gift.
click-btn-shareClicking the button to share via a social network. The social network name is passed in 'value'.
click-btn-payClicking the Pay Now button on the billing data entry form.
click-btn-continueClicking the button to buy the subscription.
click-btn-applyClicking the Apply button when redeeming a coupon.
click-btn-activateClicking the Activate button when activating a game key.
click-btn-acceptClicking the button to buy digital content.
choose-payment-widgetClicking on the payment method widget. The widget name is passed in 'value'.
choose-methodSelecting the payment method. The payment method name is passed in 'value'.
change-statusChanging the payment status. If the user closes the payment UI or leaves the page, and then the status changes, the event message is not sent.

The event parameters are passed in each message from postMessage. If the parameter information has not been collected yet, an empty string displays.

ParameterTypeDescription
actionstringEvent name.
valuestringAdditional parameter. Contains specific event parameters that vary depending on the user's choice.
statestringThe payment UI page, on which the action was performed.
datestringDate and time in the GMT format.
millisecondsnumberDate and time in the Unix time format.
timezonestringUser time zone.
session_idstringSession ID. The session includes all user actions performed within 30 minutes or until the payment UI is closed. The session starts from the moment when the payment UI is opened and is saved after the page with the payment UI is refreshed.
payment_countrystringPayment country.
purchase_invoice_idnumberPayment invoice ID in the Xsolla system.
purchase_external_idstringPayment invoice ID in the partner’s system.
purchase_typestringPurchase type. Can be: 'virtual item', 'virtual currency', 'pay2play', 'subscription'.
purchase_sumnumberNominal purchase amount.
purchase_currencystringPurchase currency.
purchase_skustringSKU of the purchased item.
purchase_digital_content_skustringSKU of the purchased game keys package.
purchase_descriptionstringPurchase description.
virtual_currency_amountnumberVirtual currency amount.
coupon_codestringCoupon code.
subscription_package_external_idnumberSubscription ID.
subscription_package_namestringSubscription name.
subscription_package_descriptionstringSubscription description.
total_sumnumberTotal purchase amount. All fees are included.
total_sum_currencystringTotal purchase amount currency.
user_idstringUser ID (v1).
user_countrystringUser country.
payment_instance_namestringPayment method name.

Events are linked to the pages where the user performs all actions when purchasing an item.

StateDescription
cartPage with the selected item purchased in virtual currency and a purchase confirmation.
couponCoupon entry form.
giftcardPage with the gift cards list (widget Gift Cards).
giftrecipientGift purchase page.
historyPurchase history page.
indexService page, to which the user is redirected after opening the application. It is not shown to the user.
legalMobile version of the page with links to legal documents.
listList of payment methods.
paybycashPage with the list of payment methods for purchasing via cash kiosks (widget Pay with Cash).
paymentPayment form.
paymentaccountPage with the saved payment accounts.
paymentreturnService page, to which the user is redirected after the payment is made, and from which the user is sent to the status page. It is not shown to the user.
pincartPage with the list of digital content platforms.
pricepointVirtual currency store.
savedmethodList of saved payment methods.
shippingaddressDelivery address form.
statusStatus page.
subscriptionSubscription plans store.
subscriptionchangeSubscription plan change.
useraccountAccount information page (username, balance) with Disable confirmation screen for future item purchases setting.
userinventoryUser inventory.
usermenuMobile version of the user menu page.
usersubscriptionUser subscriptions management.
usersubscriptioninfoSubscription details page.
virtualitemVirtual items store.


To send events to your Google Analytics and Facebook Analytics accounts, you need to integrate these analytics platforms.