Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Passing internal search phrases to prop and evar with or without quotes?

Avatar

Level 3

Whats your best practice? Do you usually strip out quotes?

If someone searches for 

"shirt"

versus searching for

shirt

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Jean-Paul,

Well it depends if searching for "shirt" or shirt returns the same data on your website. If it does strip out the double quote, if it is different data then keep the double quotes.

Best regards.

 

Alexis Cazes

View solution in original post

3 Replies

Avatar

Level 4

Hi Jean-Paul,

I totally agree with the previous suggestion given by Alexis, as it depends on the search result you get with and without double quotes (" "). 

Following are a few best practices to capture internal search terms(IST):

  • Capture IST in both, an eVar and a prop [you are already doing it :) ]
  • use toLowercase() or any other method to always capture the IST in lower case, makes your reports look cleaner !
  • Use 2 separate events to capture the "Successful Search" and "Failed Search/search with No Results"
  • Suggested to capture the # of search results when 0 as "null" or "no results found" or "zero", etc instead of passing the number "0" (zero)  

Hope this helps!

Regards,

Harsh Kabra |  Adobe Certified Expert: Digital Analytics® & SiteCatalyst Implementation & Reporting®

Avatar

Correct answer by
Community Advisor

Hi Jean-Paul,

Well it depends if searching for "shirt" or shirt returns the same data on your website. If it does strip out the double quote, if it is different data then keep the double quotes.

Best regards.

 

Alexis Cazes

Avatar

Level 3

Hey Alexis,

Thanks for your input. I'm moving forward like this.