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: add event for impression metrics #223

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

limwa
Copy link
Member

@limwa limwa commented Apr 6, 2022

This pull request adds metrics for when offers appear in search results.

@TiagooGomess
Copy link
Contributor

TiagooGomess commented Apr 6, 2022

@limwa, I suggest only doing this after #172, as this is a major change and will break this work. We discussed this at today's meeting after you left but forgot to tell you, sorry.

@limwa
Copy link
Member Author

limwa commented Apr 6, 2022

No worries, Bruno told me.
From the code I've looked at, #172 should not break this PR though.

@limwa limwa force-pushed the feature/offer-impression-metrics branch from 6849901 to 671c6eb Compare July 28, 2022 13:28
@limwa limwa marked this pull request as ready for review July 30, 2022 16:50
@limwa limwa requested a review from BrunoRosendo August 3, 2022 18:48
@limwa limwa force-pushed the feature/offer-impression-metrics branch from 4f5ebb4 to d09ed51 Compare August 3, 2022 18:49
@limwa
Copy link
Member Author

limwa commented Aug 3, 2022

@BrunoRosendo do you think it is worth it to add a label to the events? If so, what would we put in it?

@BrunoRosendo
Copy link
Member

@BrunoRosendo do you think it is worth it to add a label to the events? If so, what would we put in it?

I don't think it's worth it to put a label. It's usually used to add extra information that doesn't belong to the other fields. If we don't have extra information, then it's not needed.

Btw, can you show us how this new event looks in GA? I'm not sure how to compare offers visits with their impressions, for example. Also, can you check if setting these dimensions doesn't trigger unintended visits to the offers? I'm not sure about this.

Honestly, I think the metrics we have are well thought but their implementation/usage is confusing, I hope we're able to improve this in #230, after upgrading to GA4

@limwa
Copy link
Member Author

limwa commented Aug 3, 2022

Regarding concerns over this event triggering search events, this was the Google Analytics data for the 4th August, at the start of the test (at midnight, so no events)
image

After open the search area and scrolling down the offers and refreshing a couple times, these were the results (the page is different because the Top Events was not updating correctly)
image

No Offer/visit events were triggered and no pages other than / and /offers were visited (according to GA), so I think it is safe to say the current implementation doesn't trigger unwanted events or affect other statistics.

Regarding the "how does it look on GA?", to get a representation I go to the "Top Events" page under "Behavior", select "Event action" as the primary dimension and click the Offer/impression action. After that, I select either "Company Name" or "Offer Title" as the secondary dimension and the result is the following
image

You can also generate a Pie chart for this, as such
image

Using Offer Visit - Title as secondary dimension
image

@limwa
Copy link
Member Author

limwa commented Aug 3, 2022

Regarding the comparison of impressions vs visits, I'll look into that!

@BrunoRosendo
Copy link
Member

That's great, thanks a lot for all the steps. We'll have to document it at some point so it's nice to have it written here.

As for the comparison, I don't think it's a problem if you can't put them side by side, we can always look at them separately and compare. I was just wondering if it is possible, it would be very nice

@limwa
Copy link
Member Author

limwa commented Aug 3, 2022

I believe that the side-by-side comparison would be easier if we were using events as well for when you click an offer, but I'm not acquainted with GA at all, so I can't be certain of that...

@BrunoRosendo
Copy link
Member

BrunoRosendo commented Aug 10, 2022

I believe that the side-by-side comparison would be easier if we were using events as well for when you click an offer, but I'm not acquainted with GA at all, so I can't be certain of that...

I was thinking about this. Right now, we're using pageviews for offer visits. This mean we can see the unique offer link in the metrics, but quite frankly, it's also a very poor user experience (for us). I would suggest changing the way we do visits and use events in the same way you did in this PR. Additionally, to guarantee we have a way of comparing offers with the same title, we could use the offer ID as the event labels (in the visit and the impression). What do you think? @limwa

@limwa
Copy link
Member Author

limwa commented Aug 10, 2022

That sounds good! Should I make those changes in this PR?

@BrunoRosendo
Copy link
Member

BrunoRosendo commented Aug 10, 2022

That sounds good! Should I make those changes in this PR?

If you don't mind, I think it'd be nice to have it already here

@limwa
Copy link
Member Author

limwa commented Aug 10, 2022

Of course! I'll take care of that soon!

@BrunoRosendo BrunoRosendo linked an issue Aug 31, 2022 that may be closed by this pull request
@BrunoRosendo
Copy link
Member

This is looking very good! @limwa

Do you mind just removing the merge commit? (and while we're at it maybe squash the 2 linting commits into the first commit?)

@limwa
Copy link
Member Author

limwa commented Aug 31, 2022

Of course! Just give me one moment!

@limwa limwa force-pushed the feature/offer-impression-metrics branch from 4e6af54 to 237c0d5 Compare August 31, 2022 21:34
@limwa limwa force-pushed the feature/offer-impression-metrics branch from 237c0d5 to 9e2f67b Compare August 31, 2022 21:35
@limwa
Copy link
Member Author

limwa commented Aug 31, 2022

@BrunoRosendo this PR is ready for review

@limwa
Copy link
Member Author

limwa commented Aug 31, 2022

As soon as the CI passes 👀

Copy link
Member

@BrunoRosendo BrunoRosendo left a comment

Choose a reason for hiding this comment

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

Great job! 🚀

@limwa limwa merged commit dd66728 into develop Sep 1, 2022
@limwa limwa deleted the feature/offer-impression-metrics branch September 1, 2022 00:59
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.

Metrics - Register offers in search results
3 participants