Created
September 27, 2022 13:44
-
-
Save SahanAmarsha/a146a18e80b804ddde00ca6ded5c1bfb to your computer and use it in GitHub Desktop.
Calling 'recordWordInAnalytics' function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const searchDefinitions = async () => { | |
... | |
recordWordInAnalytics(searchInput); // call the function to record search event | |
const response = await fetch( | |
`https://api.dictionaryapi.dev/api/v2/entries/en/${searchInput}`, | |
{ | |
method: "GET", | |
headers: { | |
"Content-Type": "application/json", | |
}, | |
} | |
); | |
... | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment