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

Fixed get_random_device_type() output to match OrderAttributionMeta::get_device_type() possible return value. #145

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

rawdreeg
Copy link
Contributor

@rawdreeg rawdreeg commented Dec 3, 2024

All Submissions:

Changes proposed in this Pull Request:

  1. Fixed get_random_device_type() output to match OrderAttributionMeta::get_device_type() possible return value.
  2. Fixed small PHP warnings.

How to test the changes in this Pull Request:

  1. Using this branch, generate at least 500 orders
  2. Follow the steps to test Woo Analytics Order Attribution reports ( https://woocommercep2.wordpress.com/2024/12/03/order-attribution-reports-hpos-and-non-hpos-support-internal-call-for-testing/#how-do-i-test)
  3. Once connected, review the report, filter by Device, and confirm there is no know "Unknown" grouping

Before this PR:
image

After this PR:
Screenshot 2024-12-03 at 14 43 09

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

Fix - Remove unknown from get_random_device_type() output.

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@rawdreeg rawdreeg self-assigned this Dec 3, 2024
Copy link

@ibndawood ibndawood left a comment

Choose a reason for hiding this comment

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

Thank you, @rawdreeg, for the changes. I was able to test the PR with 500 orders and there were no Unknown devices in the generated orders.

@rawdreeg rawdreeg merged commit 5770902 into trunk Dec 3, 2024
@ibndawood ibndawood deleted the fix/unknow_device_type branch December 3, 2024 14:02
@budzanowski
Copy link
Contributor

How is Unsigned grouping generated?

@ibndawood
Copy link

The Unassigned grouping is made in the OA Reports API. This is per the Channel definitions described here: https://support.google.com/analytics/answer/9756891

Unassigned is the value Analytics uses when there are no other channel rules that match the event data.

(other) is the value Analytics uses for an aggregated row due to cardinality limits. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants