I use Prestashop V1.6.1.11, and PayU payment module. I have configured the Google Analytics module.
Currently the successful order is not captured in analytics.
I think this is because the payment module, on successful payment is redirecting to order-detail page when logged in or guest-tracking page for guest users instead of order-confirmation page.
In the goal url's of Google Analytics I have added /order-detail and /guest-tracking as goals but it doesn't help.
Is there a way to capture order confirmation in this case?
Thanks for your help.
You could add the code manually to send an event to Google Analytics on your /order-detail, /order-detail and /guest-tracking pages and then use that event to trigger your successful order goal.
For example:
ga('send', 'event', 'Order', 'Successful');
Related
I have a problem with google analytics and stripe checkout where all goal completions are attributed to checkout.stripe.com, instead of the actual referring website.
I am using Google Analytics UA and have the Global site tag on all pages. Then I have a goal to track the success page, which stripe checkout redirects to upon successful completion.
User flow:
Website visitor comes from one of the referral pages.
Then they click on the stripe checkout button, which takes them to a stripe hosted page.
On stripe hosted checkout page, enter payment info.
Upon successful payment, redirected to success.html (which is the goal being tracked in analytics).
So when a user goes to success.html, Google analytics attributes the goal completion to stripe checkout, instead of the website that referred them to my site in the first place.
Has anyone else experienced this? Am I doing something wrong or is this just how Google Analytics works when using Stripe Checkout?
This seems like a GA configuration issue rather than Stripe. I'm not really familiar with GA, but if there's some way you can override the attribution, Stripe Checkout lets you set your success_url dynamically. For example, for each customer sent to Checkout, you could include the original referrer in the success URL they'd ultimately be sent to, in addition to getting the Checkout session ID in case you'd like to retrieve some session data (like metadata):
success_url: "http://example.com/success.html?original_referral=ref_123&session_id={CHECKOUT_SESSION_ID}",
https://stripe.com/docs/payments/checkout/custom-success-page#modify-success-url
not sure if you have solved this yet but you can block certain referral urls. Go to analytics go to admin> set up assistant > tag installation> click on your data stream > more tagging settings > list unwanted referrals> then from there just exclude the url you don't want tracked so in your case it's checkout.stripe.com
When using the SagePay Form integration, the referrer in Google Analytics always shows as live.sagepay.com rather than the original referrer. This is because, when using this integration method, the user gets redirected to live.sagepay.com to complete the payment process before getting redirected back to the original website.
Since the payment templates on SagePay don't allow external scripts, we can't add the analytics tracking script here, which means cross-domain tracking is out of the question.
Is there a workaround for this problem? As many payment gateways are external and behave in a similar way I'm guessing this must be a fairly common issue?
You can add a referral exclusion in the Google Analytics account itself. This should prevent new sessions being created as per the docs:
https://support.google.com/analytics/answer/2795830?hl=en
We are using PAYU Payment Gateway. We already Setup Google Analytics Enhanced Ecommerce but in Acquisiton Overview When We Click the "Referral" we see secure.payu.com.tr instead of referral website like facebook, instagram etc. We do not want to see payment gateway referral but original referral. Hope there is a solution. Can anyone help?
The best way is of course, using PAYU's API and build your own payment gateway so that the user never leaves your site.
You can try adding payu to the referral exclusion list.
The above won't solve everything(you might still see it as direct traffic), but it should help. Puting some events on the "pay" buttons on your site before they get to payu will also help.
I'm developing a Prestashop e-commerce and I want integrate it with Google Analytics.
I've created a OrderConfirmationController.php override that provides the order data I want to send to Google Analytics.
Then, in order-confirmation.tpl I'm sending the Analytics event with the Tag Manager code.
It's working almost fine, because most of the users keep tracked. But I see there are orders that aren't being tracked. Maybe when a users pays with PayPal they can exit the browser and Prestashop doesn't render order-confirmation.tpl (so the event is not sent).
Where is the correct place to send the event?
Thank you, greetings.
You need to use hook actionObjectOrderAddAfter which is called after an order creation and has all necessary information about the order.
public function hookActionObjectOrderAddAfter($order)
{
// $order is an object
your code here
}
I cannot check exactly your PayPal module but I think it should work
For one of my sites I am using a Gravity Form plugin in combination with a Dutch payment gateway to receive new subscriptions. I would like to add a goal to my Google Analytics account with the amount of subscriptions per day. After a successful subscription a hidden "Thank you" page is loaded.
I've already various things:
Using the "Gravity Forms Google Analytics Event Tracking" plug-in, however the plug-in posts to Google Analytics when connecting to the payment gateway. Because of this all payments that are canceled or not accepted are also showing up in Google Analytics.
I have tried to use the Google Analytics goal page. Using this way we monitor if the user loads the successful payment page. However, when the page is refreshed Google Analytics will count it as two payments.
Has someone have an idea how to solve this problem in a reliable way?