Conversion tracking GA4

Phoca Cart - complex e-commerce extension
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 110
Joined: 15 Sep 2023, 10:51

Conversion tracking GA4

Post by landed »

Hi All
I am looking into ways to get GA4 and Google Ads to do better tracking. I do get purchases but GA4 is not seeing them and doesn't understand them. So I feel like this is something we all could do better at- or just me :)

Thanks for sharing your insight into this tricky and evolving setup as Google changes so darn fast.
keep2000
Phoca Member
Phoca Member
Posts: 31
Joined: 14 Nov 2022, 12:04

Re: Conversion tracking GA4

Post by keep2000 »

User avatar
landed
Phoca Professional
Phoca Professional
Posts: 110
Joined: 15 Sep 2023, 10:51

Re: Conversion tracking GA4

Post by landed »

There is no documentation so I am wondering if it works with GA4. I have looked through the code.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48053
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Conversion tracking GA4

Post by Jan »

This is the base plugin which tracks only orders, following plugin should be more advanced:
https://www.minijoomla.org/cs/joomla-ro ... phoca-cart

but no idea if it is still active :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
landed
Phoca Professional
Phoca Professional
Posts: 110
Joined: 15 Sep 2023, 10:51

Re: Conversion tracking GA4

Post by landed »

Thanks Jan.

I'd maybe like to understand how I can achieve it myself. I would want to just track orders which you say the other one does and also track initiate checkout which is probably easy since its a page load and can be done without inserting a tracking code. Maybe add to cart there is the need to add something like this:
<!-- Event snippet for Phone call lead conversion page
In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. -->
<script>
function gtag_report_conversion(url) {
var callback = function () {
if (typeof(url) != 'undefined') {
window.location = url;
}
};
gtag('event', 'conversion', {
'send_to': 'AW-yoyoyo',
'event_callback': callback
});
return false;
}
</script>
Post Reply