With a paypal like system it's easy to track the transaction with the auto-return setting and ?utm_nooverride=1 parameter, since after the payment the user is redirected back to the site.
But what if we have a system with delayed payments?
User adds to cart, checkout, but he just pays for the transaction tomorrow.
Is it possible to track a transaction like this?
I'm able to store some vars and pass them to the callback function to later use.
just as a sidenote here, in your case, there is no need to use 'utm_nooverride=1', since usually it wont take more than 30 minutes to checkout on the paying service site, the visit will be maintained when the visitor returns to your site.
About your question, unfortunately there is no way to achieve this kind of transaction, because the transaction is a visit-related tracking, and when the user comes back tomorrow to pay, it will be a new visit.
Also, as probably the user doesn´t really have to go back to your site to finish his purchase, I don´t really see the possibility.
Augusto Roselli
Web Analytics - dp6
Related
We have a problem with E-Commerce transactions sometimes not beeing set in relation to an ad click ("cpc"). They appear instead with the Channel/Medium "direct". This is a problem as we cannot correctly link our revenue to the costs spend on Google Ads.
We got a payment system that allows buyers to safely pay to sellers, and we get a fee percentage of the payment volume (similar like PayPal). We get our fees as soon as a pay-in is successful. Because our users can pay via bank wire as well it may take one or two days until we actually get our fee. This is why ecommerce transactions are not sent from the frontend to GA (on a thank-you page like in online shops), but from our server directly to GA as soon as a payment succeeds.
This is the GET call our server does when a payment succeeds:
GET https://www.google-analytics.com/collect?v=1&tid=UA-XXXXXX-1&cid=1746XXXXX.1593XXXXXXX&t=transaction&ti=mytransactionID&tr=1&cu=USD
Here is a small diagram that explains the process:
We use cross-domain tracking, and the GA Client ID of the users stay the same when they get redirected from mydomain.com to app.mydomain.com, so this should not be the problem. What I assume is, that when a user clicks on an ad, the gclid of the ad is lost. Is there a way to manually send the gclid ID to Google Analytics? I would store the gclid then as well in our payment. Or is there another (maybe better way) to send transactions to GA?
Your transaction hit will only be attributed to ad-click session if payment occurs in a 30-minutes interval since the last hit with the same ID. Otherwise, the transaction hit would start a new session. Due to 'last-non-direct' rule the new session would only be associated with "cpc" channel if there were no other intermediate sessions after ad click. Please check the Google Analytics extensive overview for deeper insight.
Storing and passing gclid might help, however, this might result in some discrepancies in cost reporting since there would be several sessions for the same click. In the case of passing gclid it's recommended to pass at least two hits:
a simple pageview hit with a dummy location parameter containing gclid
and then later a transaction hit with the same location paraeter. In that case you'll be able to see your transactions as a separate sessions with a distinct landing pages
You should make sure you're using the GA client id in the Measurement protocol hit to ensure the hit gets stitched to the other hits of that user.
Now regarding reporting: Google Analytics uses the attribution model "Last non-direct Click", despite the hit being sent later, GA will ignore direct and use the previous touch point which should be the PPC campaign.
There shouldn't be an issue there. Which report are you using to see the transaction appear as direct, rather than Paid Search?
I am building an auction website in WordPress with WooCommerce. I need to be able to automatically process payment using a customer's saved card details when an auction closes.
I already convert the product to an order when the auction ends, but cannot figure out how to process the payment too.
I don't have any code samples to share as I'm not sure where to start with this. I've looked through the Stripe and Woo docs and cannot find anything there. I'm starting to wonder if this is even possible and that perhaps it is not for security reasons.
Any pointers on this would be much appreciated.
Personal opinion says that this is a really bad idea. As someone who has coded many ecommerce solutions in the past, there really should be an 'acceptance of payment' process for any transaction. That is not due to security but to protect both parties in the transaction (the buyer AND the seller).
I would look at token-based payments if you REALLY want to go down this route but I've unfortunately never implemented them with Stripe before.
So i have following situation going:
User makes purchase request (And transaction is sent to google
analytics with 0 value).
After some time Operator confirms purchase (And transaction is updated and revenue is set to according amount)
This works like a charm so far. The Problem is the fact that when updated transaction is sent, it also, somehow, updates where transaction was sent from. for ex... if referral user made a purchase, before update i can see transactions next to referral users but after update it disappears from there since operator is not referral user. this is just one downside. Next being the fact that website has two domains, but one actual website, so if user made a transaction from domain2, after operator updates transaction, i cant see it in the "domain2 view" since operators log in "domain1".
so, how can i make it so that only revenue updates and it doesnt touch anything else?
I have an asp.net application
The User can purchase items and/or upgrade an existing service. I use PayPal to handle payments.
When the order is placed I put the order details into a table as a record. I also do this so that if the User revisits my page I check a flag in that table to tell them whether payment has been received.
If not received then I display a message on my web page telling them they have requested and upgrade and that we are currently waiting for payment.
I also disable any future purchases for that User so that they do not upgrade twice (or more).
Now, it occurs to me that when the User is redirected to PayPal to make that purchase that a payment could fail or they could close the web page.
In that case then the User would not be able to ever upgrade unless they send me a support email.
What is best practice? Wait for a time period to elapse and if no payment then allow User to try again or stick with the support email route?
If it is best to wait for a period of time what is an acceptable period of time to wait for?
I am using the post back of Form values method to imitate payment to PayPal:
https://www.paypal.com/cgi-bin/webscr
What you can do.
Each time the user is ready to leave your page and move to paypal to pay, you create
Clone of their order
A new unique ID connected with that cloned order.
So, if one order if fail, at any time the user come back is find a new set "Order"+"Unique ID". With that 2 elements can make a final payment.
You may end up with two or tree or more cloned orders, but from my experience because this is what I really do, is rare, and its safe for your customer and you.
Also please note that paypal is accept only one unique id for each order. If one ID is fail, then you must create a new one anyway.
The unique id you send to paypal go to the invoice parametre.
The manual for all parametres is this pdf - PayPal Payments Standard Intergration Guide... and there are more pdf for paypal...
I have implemented 2 payment gateways in my app (paypal and datatrans). In both gateways payment happens on gateway site i.e. user is redirected to payment gateway site where he pays and then redirected back to our site.
I have identified some scenarios where there is some issue in entire payment flow. E.g.
lost internet connection after payment and so order is not placed but money got debited from user's account
PayPal sent response but application got exception and so user did not get confirmation
Double payment due to hitting refresh button when transaction was in progress
I would like to know what are standard exceptions should be handled in payment gateway integration.
Any example with paypal would help me lot, I use asp.net mvc 3. thanks.
Double payment.
To avoid them you need to create a unique ID for every order, after the user move from your site to the paypal or other site, this ID must be read-only, and if the user return to your site after fail or other reason, and ask to re-order the same cart, you must create a new cart, and a new order ID.
For every order id, paypal and other sites allow only one payment (or one fail).
Lost the internet connections, or not get confirmations
Paypal have 3 ways that contact with your.
IPN
PDT
emails.
The one is that you get information from the return of the user after the payment, the other method is that paypal communicate with you and send you the payment informations, and final you get email.
In the rare case that all fails, user will inform you after some days that he did not get his order.
Practical they never fail all of them. Actually they never fail any of them.
Exceptions and bugs
Well some times you can not avoid bugs, so monitor your payments and log any possible errors to fix it. After 7 years of payments with paypal I still monitor them for problems, fraud, issues, new thinks etc, and still make some small adjustments time to time.