Track a Google Analytics event that occurs when a

2019-08-17 07:15发布

问题:

Our site enables users to send money to us via a bank transfer. They 'initiate' the transfer and get a reference code. Then they log in to their bank account and send the money using the reference code.

We track when a user promises to send the money but I'm not sure how to track when that money arrives. They won't be logged into the site when it happens which makes it complicated. Is there a way to do this?

Thanks in advance!

回答1:

It is possible to track events on behalf of a recent user, but it requires coding on server side. You need to use the Google Analytics Measurement Protocol to create this event, when you are notified about a successful transfer. You can send all relevant information to Google Analytics, like event category, action, or event value (e.g. transfer amount), or even track these as ecommerce transactions.

You can check the parameter reference to learn about the required and optional parameters to be sent with your hit. You can also experiment with such custom built hits with the Hit Builder tool.

If you would like this event to be connected to your existing user, then you'll also need to store your visitor's client ID during their visit, and later reuse this client ID in your backend-initiated Analytics hit.

Here is an example for an event hit for a recently stored ClientId, with given event attributes, including value.

There a few things to be considered in such scenarios, or at least to be aware of. Such events will generate additional hits in your Analytics property, and also initiate sessions, which can alter your various Analytics metrics, if their volume is comparable to your overall traffic.