wordpress icon indicating copy to clipboard operation
wordpress copied to clipboard

Track what people search for on the site

Open metmarkosaric opened this issue 4 years ago • 10 comments

This is something we may do for all sites in the future but might be easier to do for WordPress as the WordPress site search is more standardized. Basically having a custom event called "Site Search" or something like that and sending all the different things people search for as custom props. Then site owners will have a list of keywords / topics people search for on the site. More details https://github.com/plausible/analytics/discussions/164

metmarkosaric avatar Aug 02 '21 07:08 metmarkosaric

+1

masteradhoc avatar Aug 23 '21 18:08 masteradhoc

We now have a feature that allows you to get search terms so perhaps we can integrate this somehow with the WordPress plugin in the future. See https://plausible.io/docs/custom-query-params

metmarkosaric avatar Jan 04 '22 07:01 metmarkosaric

@metmarkosaric any ETA on this? Asking for the project we would like to kickoff end of the month. We're not allowed to use plausible if we dont have a native search integration

masteradhoc avatar Feb 07 '22 18:02 masteradhoc

hi @masteradhoc! no ETA at the moment unfortunately. we're actively looking for some external help with our WP plugin as we'd like to speed up its development. at the moment, the best way to get search terms would be with this feature. it works very well with the native WordPress search: https://plausible.io/docs/custom-query-params

metmarkosaric avatar Feb 07 '22 18:02 metmarkosaric

@metmarkosaric I've got an implementation ready with the custom query param above, will do a pull shortly. But I'm actually wondering if this is the right way to go. Wouldn't it make more sense to:

  • send a pageview to <example.com>/search/
  • send an event named "Search" with the value as props, so I'd do:
plausible('Search', {props: {keyword: 'test'}})

That'd make it a lot easier to look at those stats?

jdevalk avatar Jul 19 '22 11:07 jdevalk

nice one @jdevalk, thanks again! @ukutaht is the best person to speak to in terms of how it should work technically. i can see Uku shared some details here on his thinking: https://github.com/plausible/analytics/discussions/164#discussioncomment-2366631

metmarkosaric avatar Jul 19 '22 11:07 metmarkosaric

@ukutaht I think the biggest problem is that once I filter by one thing, for instance, resultCount, I can't see the other variables anymore. So I couldn't see keyword when filtering by resultCount == 0:

filter-problems

jdevalk avatar Jul 19 '22 12:07 jdevalk

@ukutaht would be good to get some input on this before continuing with https://github.com/plausible/wordpress/pull/87?

Dan0sz avatar Apr 13 '23 10:04 Dan0sz

Yes I think the custom event approach proposed by @jdevalk is the best. As he mentioned there's a limitation on filtering/displaying more than a single custom prop at a time. This is a known limitation on the backend that we are planning to address in the future.

ukutaht avatar Apr 13 '23 11:04 ukutaht

Done in #119 above.

jdevalk avatar Apr 13 '23 11:04 jdevalk

This is included in the latest beta of v2.1.0.

Dan0sz avatar Jun 07 '24 15:06 Dan0sz

Update: Latest version of our WordPress plugin introduces site search tracking. You can see the popularity of different search terms and the number of search results for the individual terms. Special thanks to @jdevalk! Details at: https://plausible.io/wordpress-analytics-plugin

metmarkosaric avatar Jul 22 '24 05:07 metmarkosaric