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

change: [M3-7688] - Gravatar Analytics #10389

Merged

Conversation

bnussman-akamai
Copy link
Contributor

@bnussman-akamai bnussman-akamai commented Apr 18, 2024

Description πŸ“

  • Adds analytics to Gravatars πŸ‘€
    • Adds one event that says whether or not the current user has a Gravatar when the page loads
    • Adds one event for when the users clicks Manage photo on the Profile Display page (http://localhost:3000/profile/display)

How to test πŸ§ͺ

Prerequisites

  • Run window._satellite.setDebug(true) in your browser console
  • Refresh your page

Verification steps

Before After
When the page loads, verify you see an event like this if you have a Gravatar Screenshot 2024-04-18 at 3 57 07β€―PM
When the page loads, verify you see an event like this if you don't have a Gravatar Screenshot 2024-04-18 at 4 01 36β€―PM
Verify you see this event when you click Manage Photo on the http://localhost:3000/profile/display page Screenshot 2024-04-18 at 4 04 14β€―PM

As an Author I have considered πŸ€”

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@bnussman-akamai bnussman-akamai added the Analytics Relating to Analytics migration project or Adobe Analytics label Apr 18, 2024
@bnussman-akamai bnussman-akamai self-assigned this Apr 18, 2024
@bnussman-akamai bnussman-akamai marked this pull request as ready for review April 18, 2024 20:48
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner April 18, 2024 20:48
@bnussman-akamai bnussman-akamai requested review from carrillo-erik and cpathipa and removed request for a team April 18, 2024 20:48
Copy link

github-actions bot commented Apr 18, 2024

Coverage Report: ❌
Base Coverage: 81.86%
Current Coverage: 81.83%

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Very nice! confirmed events are being sent. βœ…

i could see:

{
  "action": "Load",
  "category": "Gravatar",
  "label": "Has Gravatar"
  "value": true
}
{
  "action": "Load",
  "category": "Gravatar",
  "label": "Has Gravatar"
  "value": false
}

for payloads, but i guess it reporting ends up the same that's prob fine

clearInterval(interval);
}
}, 1000);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

sweet! now we can re-use this as needed

looks good, concise and leakage proof πŸ‘

@mjac0bs
Copy link
Contributor

mjac0bs commented Apr 19, 2024

Very nice! confirmed events are being sent. βœ…

i could see:

{
  "action": "Load",
  "category": "Gravatar",
  "label": "Has Gravatar"
  "value": true
}
{
  "action": "Load",
  "category": "Gravatar",
  "label": "Has Gravatar"
  "value": false
}

for payloads, but i guess it reporting ends up the same that's prob fine

value has to be a number, and that's got to stay consistent because the variable that defines it in Adobe Analytics is shared with and used for linode.com.

We could use a boolean here with the new data value, but I think label is totally fine in this case, since it's the main data we're capturing and reason for this event, and not an additional thing we're also adding on.

@bnussman-akamai
Copy link
Contributor Author

bnussman-akamai commented Apr 19, 2024

I'm a bit confused. Why did @abailly-akamai see "value": true and "value": false when I'm not even passing a value? @mjac0bs

@mjac0bs
Copy link
Contributor

mjac0bs commented Apr 19, 2024

@bnussman-akamai I read "see" as "imagine", not like physically see. πŸ˜…

@abailly-akamai
Copy link
Contributor

abailly-akamai commented Apr 19, 2024

@bnussman-akamai @mjac0bs is correct. I was envisionning such payload as a more logical one - thx for the clarification however!

is value typed that way by us? is it required to be typed as such by the script?

@bnussman-akamai
Copy link
Contributor Author

OHHH. My fault, I understand now 🀦 haha

So are we cool with using label of Has Gravatar or Does not have Gravatar?

@abailly-akamai
Copy link
Contributor

abailly-akamai commented Apr 19, 2024

am cool with that but in the future i would love to use the value field if we can control its type. not a big deal

we could event use 0/1 to represent booleans if we can't, tho i am not sure that would be an improvement

@mjac0bs
Copy link
Contributor

mjac0bs commented Apr 19, 2024

value is typed as a number by us, and I know that you technically could send a string there to Adobe.
However, if we start having boolean data in a field that is intended for numbers, our filtering in dashboards are going to get weird.

data is intended to represent booleans, as we did with is linode powered on/off. (our docs)

Screenshot 2024-04-19 at 9 08 40β€―AM

Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

Confirmed the events are firing as expected. One thing I guess we'll have to take into account when looking at this data is that page refreshes for a user will send another Has Gravatar/Does not have Gravatar event. I know we can measure the number of unique visitors, and what I think we'd really want to do in Adobe is look at the unique visitors this event is firing for.

Thank you for doing this - I'm glad we're finally collecting data!

Data for dev environment is displaying in dashboard:
Screenshot 2024-04-19 at 8 31 20β€―AM

@abailly-akamai
Copy link
Contributor

abailly-akamai commented Apr 19, 2024

ah i see - thx @mjac0bs!

I think we'd really want to do in Adobe is look at the unique visitors this event is firing for.

for sure - the user info is passed along, right?

@mjac0bs mjac0bs added the Approved Multiple approvals and ready to merge! label Apr 19, 2024
@mjac0bs
Copy link
Contributor

mjac0bs commented Apr 19, 2024

sure - the user info is passed

ah i see - thx @mjac0bs!

I think we'd really want to do in Adobe is look at the unique visitors this event is firing for.

for sure - the user info is passed along, right?

I think so, but tbh I don't know all of the variables in Adobe Analytics or the correct way to graph it in a dash. I'll follow up with Laura and/or Richa on this.

@bnussman-akamai
Copy link
Contributor Author

bnussman-akamai commented Apr 19, 2024

I am also curious about that. I feel like the data could be skewed. For example, if users with Gravatars load Cloud Manager more often, more "Has Gravatar" events will be captured. This data won't be representative of the actual percentage of users that have Gravatars setup vs not setup because it is just based on page loads as far as I have it setup. @mjac0bs @abailly-akamai

@abailly-akamai
Copy link
Contributor

@bnussman-akamai @mjac0bs

I actually want to retract my previous statement because I think we can't send any user information (event an userId) to 3rd party service without authorization. With that being said, we have a couple options:

  • AA has its own system for identifying unique users via algorithm (vid) (usually a mix of browser settings, encoded geoloc etc, stored as a cookie on the user device) which we can employ to count unique visits
  • If this proves flawed, we could attach a UUID to the payload to do that, since this would not be personal info

@mjac0bs
Copy link
Contributor

mjac0bs commented Apr 19, 2024

@abailly-akamai Yeah, I see Unique Visitors in Adobe. I don't understand how to correctly graph that against component type (custom click events) because the numbers don't look right. I did reach out to Laura to let her know we're working on this again and see if she knows the correct way to chart this.

image

@bnussman-akamai
Copy link
Contributor Author

@mjac0bs Want me to go ahead and merge or hold off?

@mjac0bs
Copy link
Contributor

mjac0bs commented Apr 19, 2024

Let's hold until I hear back from Laura just to make sure we will be able to get what we want out of this. I'll keep you posted.

Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

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

Confirming Gravatar events are firing as expected.

@mjac0bs
Copy link
Contributor

mjac0bs commented Apr 23, 2024

@bnussman-akamai We've got two solid days of stats that make sense. I'm removing the Wait to Merge and I think we can get this into next release.

Chandra, you, and I tested today:
Screenshot 2024-04-23 at 1 41 07β€―PM

I tested yesterday on various browsers:
Screenshot 2024-04-23 at 1 41 25β€―PM

@bnussman-akamai bnussman-akamai merged commit 62010b3 into linode:develop Apr 23, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analytics Relating to Analytics migration project or Adobe Analytics Approved Multiple approvals and ready to merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants