AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
Is there a reason Google Analytics 4 isn't registered as a widget?
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
Is there a reason Google Analytics 4 isn't registered as a widget? Everything else seems to be there that it needs.
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
The reason why Google Analytics 4 wasn't created as a widget is because of Google's requirements.
Google recommends placing the script into the HEAD tag and the widget cannot be placed in the HEAD tag. The second reason is that the script has to be part of every page so just enabling/disabling from admin one time is much easier than placing/removing and managing the placement of the widget accordingly.
I hope this is clear. Thanks
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
Thanks. So enabling it is supposed to put it in the header tags automatically without having to do anything else? We just upgraded a site and and checked and it is enabled, but I don't see it when I view the source of the pages.
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
There are actually two conditions. It should be enabled from admin and MeasurementId is present. Without adding measurement Id the script will not render.
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
After I posted this, the merchant put in a help desk ticket that he had implemented GA4 but no traffic was showing in his account. He has entered his measurement id. I hadn't worked on his upgrade so maybe something was changed. Is anything else required? I just tested on a 9.0.7 site I am starting to upgrade, but haven't done an work on yet, and it does work there.
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
Using Ablecommerce, you have to follow these steps to render Google Analytics 4 script on the webpage.
1- Visit page site.com/Admin/Store/Tracking
2- Enable setting Enable GA4 Page Tracking
3- Add measurement Id and Save
4- Go to retail page and view page source. Confirm that the script is rendered in the head tag of the page.
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
Thanks for your answers. I found the issue. The line of code in the _BaseLayout of your 9.0.7 hadn't been put on their site. I put it there and the tags are showing now.
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
Is there a reason Google Analytics 4 isn't registered as a widget?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close