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

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

CTA Link Clicked #6

Open ajramosSDI opened 1 year ago

ajramosSDI commented 1 year ago

This event should fire on all clicks such as Navigation Clicks, Title Clicks, Language Selection, Initial Contact Click, and Outbound Clicks

CTA Link Clicked

mgarzonjnj commented 1 year ago

Image

To check the outbound parameter above (the link clicked is internal to AskGS community or some external application link), I’m checking if the URL of application link is having “jnjgsportal” OR “jnjgs” words in it along with url parameter “/s/?language=” which are always present in our community site urls (sandbox and production). If not, then that means it’s a external site URL in application links. Formula described below: ((event.target.dataset.fileUrl.includes('jnjgsportal') || event.target.dataset.fileUrl.includes('jnjgs')) && event.target.dataset.fileUrl.includes('/s/?language=') ? false : true)

mgarzonjnj commented 11 months ago

Image

mgarzonjnj commented 11 months ago

Image

Image

Image

mgarzonjnj commented 11 months ago

@mandyjohnston03 @davisbradleyj @ACasallaJnJ

During the show and tell of Part 2 of CTA, the team raised the fact that some links refresh the browser tab that refreshed the data layer/can't capture data in console. Can you advise how we'll capture this data in production? For testing, they are forcing the clicks to open in a new tab so the data layer doesn't refresh, but that won't be the case in PROD.

mandyjohnston03 commented 11 months ago

@mgarzonjnj There is an exension called GTM Sonar that you can use to get around these. We will use that to test!

mandyjohnston03 commented 11 months ago

We will need next week to finish testing these, but just a few initial things I'm seeing I wanted to pass along:

The 'Create a request for our associates' and 'Browse phone numbers by region' are setting the outbound parameter to true, even though it points to the same domain. This should be false.

Image

davisbradleyj commented 11 months ago

@mgarzonjnj @ACasallaJnJ Validation results are being logged in this google worksheet

mandyjohnston03 commented 11 months ago

Passed in pre-dev

Image

davisbradleyj commented 11 months ago

https://jnjgsportal--uat2.sandbox.my.site.com/s/?language=es