further-external / Apollo-Documentation-UH-Hospital---CJA

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

View Search Results #9

Open rossozburnsdi opened 1 year ago

rossozburnsdi commented 1 year ago

Onsite Search Succeeded

When the results of search appear on the screen

Javascript Code

window.appEventData = window.appEventData || [];
appEventData.push({
    "event": "Onsite Search Succeeded",
    "searchResults": {
        "eventName": "view_search_results",
        "contentType": "<contentType>",
        "searchRefinements": [{
            "location": "<filter>",
            "insurance": "<filter>",
            "appointmentDate": "<filter>",
            "language": "<filter>",
            "providerGender": "<filter>",
            "treats": "<filter>",
            "newPatients": "<filter>",
            "onlineScheduling": "<filter>",
            "requestAnAppointment":"<filter>"
        }],
        "searchTerm": "<searchTerm>",
        "resultCount": < resultCount >
    }
});

Variable Definitions

Path Type Description Example
searchResults.eventName string static value, see examples view_search_results
searchResults.contentType string When used with the "search" event, this attribute will distinguish between "Site Search", "Treatments & Conditions", "Diagnostics", "Find a Doctor", "Prescription Drugs", "Clinical Trials", "Medical Education" and "Find a Location". "Site Search", "Treatments & Conditions", "Diagnostics", "Find a Doctor", "Prescription Drugs", "Clinical Trials", "Medical Education", "Find a Location"
searchResults.searchRefinements[n].location string String containing the zip code location:44101
searchResults.searchRefinements[n].insurance string String containing the selected insurance dropdown value insursance:Anthem
searchResults.searchRefinements[n].appointmentDate string String containing the appointment date appointmentDate:12-2-2023
searchResults.searchRefinements[n].language string String containing the selected dropdown value language:spanish
searchResults.searchRefinements[n].providerGender string String containing the selected filters providerGender:Female
searchResults.searchRefinements[n].treats string String containing the selected filters treats:adults,seniors
searchResults.searchRefinements[n].newPatients string set to undefined if not selected newPatients:yes
searchResults.searchRefinements[n].onlineScheduling string set to undefined if not selected onlineScheduling:yes
searchResults.searchRefinements[n].requestAnAppointment string set to undefined if not selected requestAnAppointment:yes
searchResults.searchTerm string Term the user used in search "cancer", "dr. smith"
searchResults.resultCount number The number of search results returned 2, 300, 1000

rossozburnsdi commented 1 year ago

@uhproppe

Seeing the DL event fire but need to add "Offers Request An Appointment" to the DL spec and Launch rules

Image

uhproppe commented 1 year ago

@rossozburnsdi we had an open question about results (like the blog tag / blog categories) returning as a comma separated list. Turns out the only other one we can think of would be this scenario:

There is the FAD site search data send, that sends the fields providerGender and treats as a comma separated list: https://www.uhhospitals.org/doctors/search-results?q=primary%20care&category=Specialty&latitude=&longitude=&page=1&sort=BestMatch&gender=Female%2CMale&treats=Adults%2CPediatrics%2CGeriatrics

rossozburnsdi commented 1 year ago

@uhproppe Looks good on my end

Image

Image