searchdiscovery / client-jnj-askgs-ga4-dl-spec

An Apollo generated Event Driven Data Layer
1 stars 0 forks source link

Component - Scroll #22

Open davisbradleyj opened 11 months ago

davisbradleyj commented 11 months ago

This event should fire on the webpage on all pages and in the scroll box for requests. This event should be dispatched in milestone increments i.e 25%, 50%, 75%, and 100%

Scroll.md

mgarzonjnj commented 10 months ago

@mandyjohnston03 @davisbradleyj this is ready for your review in Pre-Dev environment.

Providing a quick description on how the team got this working:

_My Case indexes 10 and Search Results 20. Everytime you scroll/stop scrolling, Scroll event will fire.

When you first load My Requests page, you see 10 results. Event will consider 10 = 100%. However if scroll to the 10th item, another 10 cases will appear and another Scroll event will fire with 20 = 100%.

Scroll Type will include page and tab information. "Page: Tab"_

I will also provide login in details of a user who has more than 10 cases so you can test this easier.

english.employee@ireland.jnjesp.predevesp Salesforce_2020!

FYI - @ACasallaJnJ

davisbradleyj commented 10 months ago

While I can confirm that we are seeing the Scroll event fire on the "My Requests" page, there is some unexpected behaviour with it refiring after reaching the end of the page and scrolling back up.

The expectation is the scroll event ceases to capture data after reaching 100%, but I am seeing the following:

Image

Image

davisbradleyj commented 10 months ago

@mgarzonjnj

Using that test login, I am met with the following security check:

Image

mgarzonjnj commented 10 months ago

Brad the verification the team gave me is Verification Code: 370486

From: Brad Davis @.> Date: Thursday, September 14, 2023 at 1:49 PM To: searchdiscovery/client-jnj-askgs-ga4-dl-spec @.> Cc: Garzon, Maria [JJCUS] @.>, Mention @.> Subject: [EXTERNAL] Re: [searchdiscovery/client-jnj-askgs-ga4-dl-spec] Component - Scroll (Issue #22)

@mgarzonjnjhttps://github.com/mgarzonjnj

Using that test login, I am met with the following security check:

[Image removed by sender. Image]https://user-images.githubusercontent.com/61176147/268066107-1075d0ea-2f38-46e3-b30b-d967989f4279.png

— Reply to this email directly, view it on GitHubhttps://github.com/searchdiscovery/client-jnj-askgs-ga4-dl-spec/issues/22#issuecomment-1719889564, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAGIMHPAWP2ZMZULTGPMXT3X2M7SJANCNFSM6AAAAAA4HSBY4E. You are receiving this because you were mentioned.Message ID: @.***>

mandyjohnston03 commented 10 months ago

@mgarzonjnj Hi Maria! A few notes on this:

  1. When I log in when the login provided above, I'm not seeing the scroll events in the dataLayer. However, Brad is able to see them using his personal login. My personal login is erroring, so I'm not able to test there.

  2. To Brad's point above, we only want the scroll events to fire on the way down. From the data perspective, we want to be able to tell how far down the user has to scroll to find a result that fits their need. For that reason - including data from scrolls back up will not tell us that story.

  3. The scroll milestones values need to be consistent. In the initial talk about this, we talked about firing at every 5 results. So, if the user scrolls to view 5 results, the scroll_milestone should be 25%, 10 results = 50%, 15 results = 75%, 20 results = 100%. That will give us a more clear picture of the user experience.

mgarzonjnj commented 10 months ago
mandyjohnston03 commented 9 months ago

@mgarzonjnj @nkuma173 When I scroll the search results using my laptop mouse, I don't see any dataLayer pushes - this screenshot is on the 8th article

Image

nkuma173 commented 9 months ago

Hi Mandy,

The event is being pushed at Scroll end. Also you will not see the Changes in DataLayer instantly. You will have to again run the Datalayer command in console to see the latest pushes. You can also see the data in GA and check how it is going through. We can have a call if you need to discuss further. But I was able to see the Scroll events pushed to DataLayer after the scroll is ended.

Regards, Nishant

From: mandyjohnston03 @.> Date: Tuesday, 3 October 2023 at 14:46 To: searchdiscovery/client-jnj-askgs-ga4-dl-spec @.> Cc: Kumar, Nishant [GPSIE] @.>, Mention @.> Subject: [EXTERNAL] Re: [searchdiscovery/client-jnj-askgs-ga4-dl-spec] Component - Scroll (Issue #22)

@mgarzonjnjhttps://github.com/mgarzonjnj @nkuma173https://github.com/nkuma173 When I scroll the search results using my laptop mouse, I don't see any dataLayer pushes - this screenshot is on the 8th article

[Image removed by sender. Image]https://user-images.githubusercontent.com/90648593/272280393-812e8b1a-0285-441e-9cf2-453f451727ab.JPG

— Reply to this email directly, view it on GitHubhttps://github.com/searchdiscovery/client-jnj-askgs-ga4-dl-spec/issues/22#issuecomment-1744996257, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAGIV3S3LZKUOEONIYKOA6DX5QIH3AVCNFSM6AAAAAA4HSBY4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBUHE4TMMRVG4. You are receiving this because you were mentioned.Message ID: @.***>

mandyjohnston03 commented 9 months ago

Hi team - @mgarzonjnj @nkuma173 After testing again several times, there are no scroll events being pushed into the dataLayer IF scrolling by dragging the mouse on a laptop.

With a separate mouse, we were able to see the scroll events. We are now not seeing it fire on the way up. However, we're still seeing it fire on random intervals.

Image

mgarzonjnj commented 9 months ago

Hi Mandy/Nishant – Would it be possible to jump on a quick 10 minute call to test together? I admit I had not tested without a separate mouse but I’m surprised why the behavior would be different.

Please let me know and I can send out the Teams information.

Best, Maria

From: mandyjohnston03 @.> Date: Friday, October 6, 2023 at 9:52 AM To: searchdiscovery/client-jnj-askgs-ga4-dl-spec @.> Cc: Garzon, Maria [JJCUS] @.>, Mention @.> Subject: [EXTERNAL] Re: [searchdiscovery/client-jnj-askgs-ga4-dl-spec] Component - Scroll (Issue #22)

Hi team - @mgarzonjnjhttps://github.com/mgarzonjnj @nkuma173https://github.com/nkuma173 After testing again several times, there are no scroll events being pushed into the dataLayer IF scrolling by dragging the mouse on a laptop.

With a separate mouse, we were able to see the scroll events. We are now not seeing it fire on the way up. However, we're still seeing it fire on random intervals.

[Image removed by sender. Image]https://user-images.githubusercontent.com/90648593/273228166-7d6f2b4c-4cb9-4e42-8ca2-d6bfcb7994e2.JPG

— Reply to this email directly, view it on GitHubhttps://github.com/searchdiscovery/client-jnj-askgs-ga4-dl-spec/issues/22#issuecomment-1750718035, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAGIMHP6OZ3YB6GFIIP6B5TX6AEHVAVCNFSM6AAAAAA4HSBY4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQG4YTQMBTGU. You are receiving this because you were mentioned.Message ID: @.***>

davisbradleyj commented 9 months ago

Hi @mgarzonjnj

I do not believe an additional call is going to be possible. As it stands we have no time available left for this engagement, outside of the GA4 training that was requested for the week of October 23-27 (I believe you had asked specifically for October 26th).

We can be available in the following time blocks that week:

Tuesday, October 24:

Wednesday, October 25:

Thursday, October 26:

I will follow up via email with these times as well, but please let us know which time block would work best for your team.

mgarzonjnj commented 9 months ago

@mandyjohnston03

The scroll events are sent once the user stops scrolling. If user begins to scroll down and stops at the 7th result, the scroll event will capture a percentage calculated using the number of pixels which show how far the user has scrolled down from the top.

Formula being used for background: Math.round((Number(div.scrollTop) + Number(div.offsetHeight))*multiplier/Number(div.scrollHeight))

If I am understanding what you're saying, what you were expecting is only 4 scroll events ever. If 20 results are 100$, if the user scrolls down to result #5, only then would the event send a 25%. If they scroll to result #7, no event would be sent. If they scroll to result 13, the 50% event would be sent.

Am I understanding this correctly?

mandyjohnston03 commented 9 months ago

@mgarzonjnj An event would fire for each milestone passed so, if someone scrolls to result #7, the 25% event would send (when the 5th result was passed), but not the 50% since they didn't get to the 10th result. So if someone scrolls to 20 results, all 4 scroll events would send.

I'm not sure exactly which questions you want to answer with this. In my mind, it would be primarily trying to identify which search terms people have to scroll down a significant amount to try to find a search result. This should also be answered with the select search result event, in combination with the slot and total result parameters). What question are you hoping to answer by the component scroll on the My Requests page?

With that in mind, if you feel that it would be more valuable to fire an event with a result count vs. a percentage every time it passes 5 results (that I mentioned a couple weeks ago), that direction works as well. The key is that the milestones are consistent. This may be easier to accomplish on the developer end.

cc @davisbradleyj