Skip to content

Conversation

maryia-deriv
Copy link
Contributor

@maryia-deriv maryia-deriv commented Feb 20, 2024

Changes:

  • To send trade params analytics when a user is changing trade parameters and buys a contract.

Examples:

Data payload that we will send with ce_contracts_set_up_form event to RudderStack via @deriv/analytics:

  1. Duration types Dropdown:
{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "parameter_type": "duration_type",
    "parameter_field_type": "dropdown",
    "duration_type": "minutes"
}
  1. Duration input:
    2.1. Manual:
{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "parameter_field_type": "number",
    "parameter_type": "duration_value",
    "parameter_value": "292",
    "input_type": "manual"
}

2.2. Using Plus/Minus buttons:

{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "parameter_field_type": "number",
    "parameter_type": "duration_value",
    "parameter_value": "290",
    "input_type": "plus_minus"
}
  1. Date picker (analytics will be sent both for desktop & mobile Date picker):
{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "parameter_field_type": "date_picker",
    "parameter_type": "date_picker",
    "parameter_value": "2024-02-28"
}
  1. Time picker:
{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "parameter_field_type": "time_picker",
    "parameter_type": "time_picker",
    "parameter_value": "13:20"
}
  1. Tick range slider:
{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "parameter_field_type": "tick_bar",
    "parameter_type": "tick_value",
    "parameter_value": "8"
}
  1. Stake/Payout input:
    6.1. Manual:
{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "input_type": "manual",
    "parameter_field_type": "number",
    "parameter_type": "payout_value",
    "parameter_value": "13"
}

6.2. Using Plus/Minus buttons:

{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "input_type": "plus_minus",
    "parameter_field_type": "number",
    "parameter_type": "stake_value",
    "parameter_value": "15"
}
  1. Allow equals checkbox:
{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "change_parameter_value",
    "parameter_field_type": "checkbox",
    "parameter_type": "allow_equals_mode",
    "parameter_value": "yes"
}
  1. Switchers selection will be sent upon the 'Buy' button click if the Switchers (Duration tabs and/or 'Stake'/'Payout' tabs) are present in UI at the moment of the click:
{
    "form_name": "default",
    "trade_type_name": "Rise/Fall",
    "action": "run_contract",
    "switcher_duration_mode_name": "duration",
    "switcher_stakepayout_mode_name": "payout"
}

@boring-cyborg boring-cyborg bot added the Trader label Feb 20, 2024
Copy link

vercel bot commented Feb 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview Mar 12, 2024 9:44am

Copy link
Contributor

github-actions bot commented Feb 20, 2024

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/13712](https://github.com/binary-com/deriv-app/pull/13712)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-maryia-deriv-maryia-dtra-904trade-par-d76227.binary.sx?qa_server=red.derivws.com&app_id=23847
    - **Original**: https://deriv-app-git-fork-maryia-deriv-maryia-dtra-904trade-par-d76227.binary.sx
- **App ID**: `23847`

Copy link
Contributor

github-actions bot commented Feb 20, 2024

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 28
🟢 Accessibility 90
🟢 Best practices 92
🟧 SEO 81
🟧 PWA 78

Lighthouse ran with https://deriv-app-git-fork-maryia-deriv-maryia-dtra-904trade-par-d76227.binary.sx/

@coveralls
Copy link

coveralls commented Feb 20, 2024

Coverage Status

coverage: 37.94% (+0.4%) from 37.514%
when pulling 8f2afab on maryia-deriv:maryia/dtra-904/trade-params-metrics
into 4262722 on binary-com:master.

akmal-deriv
akmal-deriv previously approved these changes Mar 1, 2024
akmal-deriv
akmal-deriv previously approved these changes Mar 7, 2024
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.3% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

Generating Lighthouse report...

@maryia-deriv maryia-deriv merged commit 5b32d68 into deriv-com:master Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants