Skip to content

Instantly share code, notes, and snippets.

@SahanAmarsha
Created September 27, 2022 13:44
Show Gist options
  • Save SahanAmarsha/a146a18e80b804ddde00ca6ded5c1bfb to your computer and use it in GitHub Desktop.
Save SahanAmarsha/a146a18e80b804ddde00ca6ded5c1bfb to your computer and use it in GitHub Desktop.
Calling 'recordWordInAnalytics' function
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