Google Analytics


Google Analytics allow you to track users and monitor activity on your site.


Using Google Analytics tracking code

Google Analytics can be used with the Payment Pages by using custom JavaScript code. Follow the example below to use this feature.

Upload a file using the MyST File Manager called default.js containing the following code:


// Adding Google Analytics to Trust Payments Payment Pages.
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

Replace the text “UA-XXXXX-X” to be your Google Analytics web property ID.

  For merchants customising their Payment Pages using custom stprofiles, upload this JavaScript file separately for each profile, with the filename [stprofile].js

Google Analytics will set cookies on the customer’s browser.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request