Jump to content

Google Analytics Goal Tracking while using Paypal checkout


Felix-dev

Recommended Posts

Hello guys,

I'm using whmcs 8.8.0 and I have Google Analytics activated and Paypal Checkout as my default and only payment gateway.

I was looking further into setting the conversion which I need for my bidding strategy in Google Ads (linked to G A).

The interesting point is this:

So, has anyone here got into this case also? and could you resolve it?

and go you think that the update to whmcs 8.11.x + using Paypal Payments would resolve it. Knowing that I will propably keep Paypal checkout activated too to maintain the current subscriptions as I recall I read earlier in the documentation.

Appreciate you help!

 

 

Link to comment
Share on other sites

  • 1 month later...
Quote

Can you share link of module here?

I am using the 'Google Analytics' module that is included within WHMCS.

Quote

I have one question from your end, you exactly want to track the users, once they will complete the order after payment is done?

Yes, I want to track the conversion (sale) that occurs and in Google Analytics they say it is only rendered in the 'Order Complete' page, but it is never displayed when the payment is done through PayPal!

Link to comment
Share on other sites

  • 9 months later...

This is a very common issue when using payment gateways like PayPal that redirect users off-site and then back, especially with WHMCS's default behavior not consistently hitting the 'Order Complete' page for goal tracking.

You're right that the conversion code isn't firing because the redirect to the invoice bypasses the page where WHMCS's built-in Google Analytics goal tracking is supposed to render.

Regarding WHMCS 8.11.x and PayPal Payments - while updates often improve integrations, the core problem remains: the client's final return destination after a successful payment often isn't the dedicated 'Order Complete' page necessary for client-side tracking, though some newer gateways handle this better with post-payment redirects.

Keeping PayPal Checkout for existing subscriptions might be necessary, but that won't resolve your new conversion tracking issue.

A more robust and future-proof solution is to use a server-side tracking approach.

The best method involves combining the WHMCS API, Google Analytics Data API, PayPal REST APIs, and a tag management system like Google Tag Manager (GTM) with a service such as Stape or Google Cloud Platform for server-side processing.

Instead of relying on the client's browser to load the 'Order Complete' page, you tell your server to report the successful conversion directly to Google Analytics and Google Ads.

When a successful payment is confirmed by PayPal's system back to WHMCS, you can trigger a custom script or hook within WHMCS that uses the WHMCS API to confirm the order details.

This script then sends the purchase event - including details like the transaction ID, value, and currency - to a server-side GTM container running on Stape or Google Cloud Platform.

The server-side GTM then uses the Google Analytics Data API to send the correct event - such as 'purchase' - to Google Analytics and the corresponding conversion data to Google Ads.

This is significantly better because it removes the reliance on the client's browser loading a specific page, eliminates issues with ad-blockers and browser privacy settings that often prevent client-side tracking, and ensures a much higher data accuracy rate, which is critical for your bidding strategies.

It’s more complex to set up initially, but it provides reliable, consistent tracking data, overcoming the inherent limitations of redirect-based payment flows.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated