Page 1 of 1

Google Conversion Plugin error

Posted: 26 Jan 2024, 11:08
by keep2000
Hello

first question: Phoca Cart-related plugin support belongs to this topic or Phoca Cart topic? :)

I work with a Yootheme pro template which supports embeding google analytics code from it's core, it does work well. I also installed 'Google Conversion Plugin', but I got error: "gtag is not defined".
Do I need to change something? I noticed that the conversion script is before the ga4 code. How can I move the conversion after the analytics code is loaded?

Re: Google Conversion Plugin error

Posted: 26 Jan 2024, 16:13
by Jan
Hi, try to change the ordering of the plugin, so it is ordered after the script with ga4 code.

Jan

Re: Google Conversion Plugin error

Posted: 26 Jan 2024, 17:07
by keep2000
Thanks, but Google Conversion Plugin is a pcv plugin, and I'm not sure how yootheme puts the code there, I assume it's their system plugin. I can't mix the ordering of two plugins with different types, can I? :)

Re: Google Conversion Plugin error

Posted: 26 Jan 2024, 17:15
by Jan
Hi, yes, you are right, this will be not possible to order system and view plugin together. The question is why the system plugin does no render this info as first :idea:

Are you able to test it with another plugin, e.g. add the code with help of Phoca Site plugin:
https://www.phoca.cz/phoca-site-plugin

Jan

Re: Google Conversion Plugin error

Posted: 30 Jan 2024, 11:49
by keep2000
Same result with phoca site plugin.
Ps: I work with Joomla 5 if it does change something

Ps2:
I just wraped the gtag event with window.addEventListener(\'load\', function() { ... }); in the pcv plugin and it seems working for now

Re: Google Conversion Plugin error

Posted: 30 Jan 2024, 13:57
by Jan
Hi, thank you very much for the info, I will take a look at it for the plugin.

Jan