Skip to content

WS-70 - Update Inline JS in to meet new coding standards: ATI Analytics#14119

Open
holchris wants to merge 27 commits into
latestfrom
WS-70-update-inline-js-in-to-meet-new-coding-standards-ati-analytics
Open

WS-70 - Update Inline JS in to meet new coding standards: ATI Analytics#14119
holchris wants to merge 27 commits into
latestfrom
WS-70-update-inline-js-in-to-meet-new-coding-standards-ati-analytics

Conversation

@holchris

@holchris holchris commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Resolves JIRA: WS-70

Summary

This PR updates addSendStaticBeaconToWindow and sendPageViewBeaconOperaMini to follow coding standards to maintain inline JS

Code changes

  • Updates CanonicalATIAnalytics and sendPageViewBeaconOperaMini to pass inline script functions and explicit parameters into addScript
  • Updates tests to reflect the refactor of addSendStaticBeaconToWindow and sendPageViewBeaconOperaMini
  • Refactors addSendStaticBeaconToWindow from a string inline script into an actual function module
  • Updates addInLineScript so it can accept parameters and embed them directly via toString()
  • Removes eval execution, injects explicit Opera Mini detection helpers, and updates the assertions to call sendPageViewBeaconOperaMini directly while preserving coverage for beacon sending, referrer handling, single-run protection, and non-Opera behavior

Testing

  1. List the steps required to test this PR.

Useful Links

@holchris holchris self-assigned this Jun 11, 2026
@holchris holchris marked this pull request as ready for review June 17, 2026 11:44
Comment thread src/app/lib/analyticsUtils/staticATITracking/sendStaticBeacon/index.test.ts Outdated
Comment thread src/app/lib/utilities/addInlineScript/index.tsx
@holchris holchris requested a review from LilyL0u June 22, 2026 10:37

@LilyL0u LilyL0u left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's get this tested!

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.

5 participants