We read the vertical from site_options. This should be assigned during onboarding and should be the vertical _ID_.
eg: https://public-api.wordpress.com/wpcom/v2/verticals/p31v28/templates
However for some sites we are getting the Vertical _Name_.
eg: https://public-api.wordpress.com/wpcom/v2/verticals/Cameras%20&%20Photography/templates
We need to know either that
Note that synonyms are also available and used for searching. Could we add the pretty slug to the synonyms for matching.
@michaeldcain It looks like some Jetpack sites save the vertical slug instead of the vertical id in their site_vertical option. We use that value to retrieve templates from the API.
Are you aware of that behavior, is that expected? Should it be changed? Or should we just update the API endpoint to accept either?
Note that synonyms are also available and used for searching.
@getdave I believe the synonyms won't be searched until the ES integration is complete.
It looks like some Jetpack sites save the vertical slug instead of the vertical id in their site_vertical option.
@obenland: I believe that this is done when the user's input doesn't match to one of our verticals, and was done as part of some JP data analysis (panfyZ-18-p2). I don't think you should update your endpoint to accept either. @jeffgolenski @mikael what do y'all think of removing that exception?
Have chased in CJS75TX3R/p1562148628090300-slack-ajax
I'll let @simison speak to the technicalities of this. It doesn't matter to me how it's done. Just that we collect that data. Let me know if I'm missing anything!
@obenland, @simison
For Jetpack (and non-atomic) sites we indeed enabled free text for both Site Type and Vertical in D26585-code, meaning we save plain text if no id is encoded. It is an option, not a rule, both are possible atm. It was the discovery phase for Jetpack options, thus we did not impose set categories.
That said, data analysis of the vertical step ( see panfyZ-1w-p2 ) indicated that in fact, it can be removed. Or re-run, refined and removed, since its usage at the time of the analysis was < 3%.
To summarise next steps for @Automattic/ajax :
name to slug to match up with .comname as the verticalSee also paObgF-k1-p2.
This is being addressed in D30218-code
Steps collecting this data during jetpack flow being removed in https://github.com/Automattic/wp-calypso/pull/34506
Shipped D30218-code