The hosted payment pages can use the Google Analytics Measurement Protocol to send information on customer progress through the payment pages. You will need to provide your tracker ID, the customers Client ID, and details of the domain you want to record the events under.
Field | Description | Notes |
---|---|---|
tid | Tracker ID | Your Google Analytics tracker ID |
cid | Client ID | The customer's client ID |
dh | Your hostname | No protocol (such as http: etc), just the domain (e.g. www.site.com) |
dp | Document path | This will be used as a prefix to the path sent at each stage. It must start with '/' |
ds | Data source | Optional. If not set, then 'web' will be used. |
cn | Campaign name | Optional fields to allow you to specify any required campaign tracking values. |
cs | Campaign source | Optional fields to allow you to specify any required campaign tracking values. |
cm | Campaign medium | Optional fields to allow you to specify any required campaign tracking values. |
ck | Campaign keyword | Optional fields to allow you to specify any required campaign tracking values. |
cc | Campaign content | Optional fields to allow you to specify any required campaign tracking values. |
ci | Campaign ID | Optional fields to allow you to specify any required campaign tracking values. |
gclid | AdWords ID | |
dclid | Display Ads ID |
The URL sent for each payment stage is constructed by adding the following to the value in ’dp’
URL | Description |
---|---|
/telr/data_entry.html | Initial Data Entry |
/telr/service_out.html | Redirect to service provider |
/telr/service_back.html | Return from service provider |
/telr/mpi_check.html | 3D-Secure Enrolment Check |
/telr/acs_out.html | Redirect to card issuer (3D Secure) |
/telr/acs_back.html | Return from card issuer (3D Secure) |
/telr/card_auth.html | Card authorisation request |
/telr/authorised.html | Transaction authorised |
/telr/declined.html | Transaction declined |
/telr/cancelled.html | Transaction cancelled |
If you have set ‘ga_dp’ to a value such as ‘/payments’ then the URLs sent to the analytics system would be ‘/payments/telr/data_entry.html’, ‘/payments/telr/mpi_check.html’ and so on.
Example
{
"method": "create",
"store": 15996,
"authkey": "mykey1234",
"order": {
"cartid": "1234",
"test": "1",
"amount": "10.50",
"currency": "AED",
"description": "My purchase"
},
"return": {
"authorised": "https://www.mysite.com/authorised",
"declined": "https://www.mysite.com/declined",
"cancelled": "https://www.mysite.com/cancelled"
},
"ga": {
"tid": "xxx",
"cid": "xxx",
"dh": "xxx",
"dp": "xxx",
"ds": "xxx",
"cn": "xxx",
"cs": "xxx",
"cm": "xxx",
"ck": "xxx",
"cc": "xxx",
"ci": "xxx",
"gclid": "xxx",
"dclid": "xxx"
}
}
Obtaining the client ID
You will need to get the client ID from the Google Analytics code you are operating on your site prior to sending the transaction request. If you are using the analytics.js method, then you can use the following code on your page to retrieve the client ID:
ga(function(tracker) {
var clientId = tracker.get('clientId');
});
See https://developers.google.com/analytics/devguides/collection/analyticsjs/domains#getClientId for more details.