[ABTEST-418] Check and improve Events sending in client side (Javascript) Created: 16/Mar/21  Updated: 16/Apr/21  Resolved: 30/Mar/21

Status: Closed
Project: A/B Testing
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: High
Reporter: Nguyen Phung Chi Assignee: Chuong Doan Huy
Resolution: Fixed Votes: 0
Labels: VN-Analysis, VN-Implementation, VN-Testing
Remaining Estimate: Not Specified
Time Spent: 3d 1.5h
Original Estimate: Not Specified

Template:
Acceptance criteria:
[ ]* Find and improve the mentioned aspect of the event sending js
[ ]* Fix the issue of empty userId
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[X]  Architecture Decision Record (ADR)
Epic Link: ABn GA tasks
Sprint: Add-Ons 60
Story Points: 5

 Description   

I see that there are some spaces for improvements for this part of ABn Testing.

The event sending javascript is quite important because it's the integration point (calling to Magnolia REST endpoint) between the ABn Testing page and API gateway (where the incoming request process and store the events data)

  1. Therefore, let's check and see what we can improve in some aspect below:
    • Code quality
    • Performance and stability
    • Error handling
  2. The sent event json has an empty value of the field `userId`, we noticed this issue while running traffic generator, and this is not only happened with traffic generator, also every first request in a new session (try to use a Firefox private window to check this).

Dev notes:

The related Js located in here: https://git.magnolia-cms.com/projects/ADDON/repos/ab-testing/browse/magnolia-abtesting/src/main/resources/ab-testing/webresources/js

  • The main one is `user-actions-bundle.js`

Generated at Sun Feb 11 22:56:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.