Closed gunjam closed 5 years ago
I noticed in the previous implementation there's some tests, is it possible to get this tested here?
I've added in the missing unit tests from the previous version.
Ta.
Wow! @gunjam I am super impressed. How did you find that commit? I'd forgetten I even worked on that project.
This looks good to me, but I think will be a breaking change since it'll always favour the ga global (which should be fine but is a breaking behaviour) 👍
Hi all. Is there any chance of getting this merged? Some of our services have updated to universal analytics and I'd love to get rid of our fork of the old repo.
Going to ping the Analytics community at GDS to see if they're OK with this change.
This doesnt seem to be used much internally at GDS, but rather a library used for external services: https://github.com/search?l=JavaScript&p=1&q=org%3Aalphagov+GOVUK.performance&type=Code
Update: I went through these and could not find any up to date usage of this.
I have spoken to @gunjam and got their approval for the updates I have made.
:shipit:
Google Analytics Universal provides a function
ga
that sends all communication to Google Analytics. ThesendGoogleAnalyticsEvent
function now checks if thega
function exists and if it does, uses it.Port of commit 6bb47fd by @robyoung