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

feat(EMI-2044): Add tracking to Auction Signals #10699

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

MrSltun
Copy link
Member

@MrSltun MrSltun commented Sep 3, 2024

This PR resolves EMI-2044

Description

This PR adds tracking for Artworks with auction signals

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

  • add tracking for artwork auction signals - mrsltun

Need help with something? Have a look at our docs, or get in touch with us.

@MrSltun MrSltun self-assigned this Sep 3, 2024
@MrSltun MrSltun marked this pull request as ready for review September 3, 2024 20:00
@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Dev changes (add tracking for artwork auction signals - mrsltun)

Generated by 🚫 dangerJS against 595be57

Copy link
Contributor

@erikdstock erikdstock left a comment

Choose a reason for hiding this comment

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

LGTM, nothing blocking here.

Comment on lines +230 to +233
...getArtworkSignalTrackingFields(
artwork.collectorSignals,
AREnableAuctionImprovementsSignals
),
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

import { isEmpty } from "lodash"
import { DateTime } from "luxon"

export type CollectorSignals = LargeArtworkRail_artworks$data[0]["collectorSignals"]
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking: If this file is dependent on this one specific type, should it be located with that file?

Copy link
Member Author

Choose a reason for hiding this comment

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

not really, since it's not a component, it's a function to get data, but I didn't want to create a type and decided to use relay types for the data

Comment on lines +26 to +28
if (!isEmpty(partnerOffer)) {
signal_label = "Limited-Time Offer"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This might evolve with implementations for the UI as well after artsy/metaphysics#5956 merges.

"signal_label" | "signal_bid_count" | "signal_lot_watcher_count"
>

export const getArtworkSignalTrackingFields = (
Copy link
Member

Choose a reason for hiding this comment

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

I don't like that we need to restate this auction logic just for the tracking. I was under the assumption that the signal_label was just to track the "Limited-time offer" "Curators Pick" and "Increased Interest" badges, which is why I pushed for the "Primary Label" field in metaphysics , to easily figure out what is being shown to the user. I see now it's written as an example in the Cohesion PR and I should have caught this sooner, sorry. I don't see the benefit in tracking the "Time left to bid" and "Bidding live now" here. Not going to block this PR as I know it needs to go out soon, but I don't want to recreate this in force. @erikdstock maybe we can discuss this tomorrow.

Copy link
Contributor

Choose a reason for hiding this comment

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

:ceiling-cat: I agree with Rachel here, this should be 1:1 from the properties we receive and forward, we shouldn't manipulate the event data before sending it to the clients

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree as well, but we have so many different places where tracking events are being sent, so I decided instead of adding the functionality in all the places, I extracted it to one place and used it wherever applicable

@MrSltun
Copy link
Member Author

MrSltun commented Sep 4, 2024

I'll merge this PR if that's okay and continue on with the release :)

@MrSltun MrSltun merged commit 5e7f823 into main Sep 4, 2024
8 checks passed
@MrSltun MrSltun deleted the mrsltun/EMI-2044/add-tracking-for-auction-signals branch September 4, 2024 10:02
MrSltun added a commit that referenced this pull request Sep 4, 2024
* feat(EMI-2044): Add tracking to Auction Signals

* fix test

* update tests

* fix test 2.0
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.

5 participants