- Merge request !8Issue #3276807: Include Google Analytics script in separate file → (Open) created by beunerd
The patch in #18 seems to be working for me as well. Thanks very much.
Hopefully this can get picked up, as it seems to be the best way for GA4 on a site with a strong CSP.
- last update
over 1 year ago run-tests.sh fatal error After updating to Drupal 10.1, the patch in #18 stopped working for me. When the url was being built, it didn't properly parse out the assets folder, so I ended up with pages linking to
src="//js/google-analytics-XX"
.In my case, I don't have an assets folder specified, but with the logic in the patch, it comes back as existing and uses the same value as the public folder. I found that a small change from
$settings->get('file_assets_path')
toAssetsStream::basePath()
made the difference for me.Otherwise the rest of the changes from r.van.doorn work great. I'm uploading my patch which is basically all of r.van.doorn's work with two lines changed, as well as an interdiff. This works for me on D10.1, and still seems to work as expected on D9.5 as well.
- Status changed to Needs work
about 1 month ago 8:02pm 11 November 2024 - 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
There is a merge request, can that be updated based on the latest changes? Patch workflow is not going to stick around for the long haul, best get to grips with the MR workflow. Also, a quick glance at the patch told me that there are some unrelated code changes in the patch. It is best to limit code changes for an issue to the changes required to solve the issue at hand; it limits the chance of merge conflicts and reduces the number of lines to review.
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
I updated the MR with the latest changes from #21 and merged in 4.x in the process. I'm looking into the implications of using the AssetsStream wrapper directly... I don't think this will work in the current form with Drupal 9.3, which is currently the oldest core version this module claims to support.
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
Just noticed the deprecated notice on the module status and found more information in the documentation (maybe a bit more information wouldn't hurt on the project page either).
Anyway, I rolled back some unrelated changes, which hopefully makes reviewing this a little easier. However, with tests out due to the move to GitLab, I have little faith in this actually ever making the finish line...
- First commit to issue fork.
- 🇺🇸United States japerry KVUO
Unfortunately I do not believe such a large change will occur in this module, due to its EOL status. Working to update the documentation so that users will goto the Google Tag module instead. Fortunately the Google Tag module incorporates the goals of this patch, so please try it out!
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
Thanks. The customer was already in the process of moving to GTM, so this was a nice extra nudge :)