Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor search category/count to not use custom variables #15286

Merged
merged 29 commits into from Mar 9, 2020
Merged

Conversation

katebutler
Copy link

Fixes #12072

@katebutler katebutler added the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label Dec 18, 2019
@katebutler katebutler added this to the 4.0.0 milestone Dec 18, 2019
@tsteur tsteur changed the base branch from 3.x-dev to 4.x-dev January 14, 2020 03:59
@sgiehl
Copy link
Member

sgiehl commented Feb 17, 2020

Guess Kate won't finish this PR, so I will take over...

@sgiehl sgiehl self-assigned this Feb 17, 2020
@sgiehl sgiehl force-pushed the 12072 branch 4 times, most recently from c23465c to a442aa8 Compare February 18, 2020 19:22
@sgiehl
Copy link
Member

sgiehl commented Feb 18, 2020

I've updated the PR and fixed some obvious bugs, adjusted the tests and also made search category and count available as segments

Should be ready for a review now

@sgiehl sgiehl removed their assignment Feb 18, 2020
@sgiehl sgiehl added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Feb 18, 2020
Copy link
Member

@diosmosis diosmosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple comments, code looks good and tests pass, can be merged after comments dealt w/.

core/Columns/Discriminator.php Outdated Show resolved Hide resolved
plugins/Actions/Archiver.php Outdated Show resolved Hide resolved

if (in_array($cvarKey, ['_pk_scat', '_pk_scount'])) {
continue; // ignore old site search variables
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it currently supported to send these custom variables manually in tracking requests? Would this break that use case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it seems it wasn't restricted to send those variables manually. Not sure if that is something we should handle 🤔 Don't think someone used those variables accidentally.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess our options are:

  • just stop handling them
  • report a tracking error if found so users can fix their tracking code
  • keep handling them in some way (ie, not recording as custom var, but as search dimension value)

What do you think?

cc @tsteur

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reckon we can keep the logic there as is and doubt indeed someone uses these values. And in worst case these values would just not be visible in the visitor log.

@diosmosis
Copy link
Member

There are some tests that are failing, including one UI test that looks non-trivial to fix, otherwise looks good to merge to me.

@sgiehl
Copy link
Member

sgiehl commented Mar 2, 2020

@diosmosis the failing plugin tests simply needs to be update in the submodule. Would do that before merge. But which UI test are you referring to? I think all of those failing here might also fail on 4.x-dev. (some of them started failing after merging 3.x-dev to 4.x-dev)

@diosmosis
Copy link
Member

@sgiehl there was an actions report that was failing but I don't see it anymore, I'm not sure what happened there. I guess ignore my comment.

@diosmosis diosmosis merged commit c1ddd0c into 4.x-dev Mar 9, 2020
@diosmosis diosmosis deleted the 12072 branch March 9, 2020 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Site Search tracking should not use Custom Variables
4 participants