Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move analytics code to preload #1429

Merged
merged 6 commits into from
Aug 13, 2023
Merged

Conversation

fiammybe
Copy link
Member

Move the UA code to the preload. This code also looks for the value of the Google Analytics tag and decides based on that whether to add the old UA or the new GA4 script

@skenow
Copy link
Contributor

skenow commented Mar 15, 2023

In my tests, the ['async'] attribute is not rendered with this - I had to use ['async' => 'async'], which is valid notation for the script. Our code also inserts type=text/javascript into the script signature. Not a big deal.

changed 'async' => 'async'
@fiammybe
Copy link
Member Author

updated the 'async' => 'async' and making it ready for review

@fiammybe fiammybe marked this pull request as ready for review March 16, 2023 23:03
@fiammybe fiammybe requested a review from skenow March 16, 2023 23:04
Copy link
Contributor

@skenow skenow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify the proper tag values are being passed to the methods. The UA snippet has also changed when checking on GA.

htdocs/plugins/preloads/googleanalytics.php Show resolved Hide resolved
htdocs/plugins/preloads/googleanalytics.php Outdated Show resolved Hide resolved
htdocs/plugins/preloads/googleanalytics.php Outdated Show resolved Hide resolved
@fiammybe fiammybe requested a review from skenow June 2, 2023 09:56
@fiammybe fiammybe marked this pull request as draft June 13, 2023 12:07
@fiammybe fiammybe marked this pull request as ready for review August 4, 2023 13:31
@fiammybe fiammybe requested a review from skenow August 4, 2023 13:31
@skenow skenow changed the title Move analytics code to preload (draft) Move analytics code to preload Aug 13, 2023
@skenow skenow merged commit de05c38 into ImpressCMS:1.5.x Aug 13, 2023
@fiammybe fiammybe deleted the ua-ga4-preload branch October 8, 2024 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants