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

Fix/homepage tracking sit 2447 #139

Merged
merged 2 commits into from
Oct 14, 2021
Merged

Conversation

Rahmon
Copy link
Contributor

@Rahmon Rahmon commented Oct 13, 2021

Description of the Change

This change tries to:

  • Prevent the plugin to track the homepage when it’s a CMS update
  • Fix the tracking via JS when a user accesses the homepage.

Alternate Designs

Benefits

Possible Drawbacks

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Closes #123

Changelog Entry

Changed the tracking of the homepage on the Dashboard
Fixed the tracking of the homepage on the frontend

@Rahmon Rahmon added this to the 1.0.5 milestone Oct 13, 2021
@Rahmon Rahmon requested review from felipeelia and jeffpaul October 13, 2021 21:45
Copy link
Contributor

@jeffpaul jeffpaul left a comment

Choose a reason for hiding this comment

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

This looks generally correct to me, but will defer to @felipeelia for a more official code review.

@felipeelia
Copy link

@Rahmon @jeffpaul not sure if I have the full context for this one but here are my 2 cents:

For track_event(): I wonder if this will behave as we'd expect if the WP admin user has set both Homepage (accessible by www.domain.com/, for example) and Posts page (www.domain.com/blog)? If we don't want to track any of those, then the code looks good. Otherwise, we'll need to adjust it a little bit.

For get_tracking_data(): With the same scenario in mind, isn't it a problem if we have two "homepages"?

@Rahmon
Copy link
Contributor Author

Rahmon commented Oct 14, 2021

@Rahmon @jeffpaul not sure if I have the full context for this one but here are my 2 cents:

For track_event(): I wonder if this will behave as we'd expect if the WP admin user has set both Homepage (accessible by www.domain.com/, for example) and Posts page (www.domain.com/blog)? If we don't want to track any of those, then the code looks good. Otherwise, we'll need to adjust it a little bit.

For get_tracking_data(): With the same scenario in mind, isn't it a problem if we have two "homepages"?

@felipeelia

For track_event(), we don't want to track any of those scenarios.

For get_tracking_data(), when you're accessing the homepage even if we have two homepages, we need to send the type as section.

@jeffpaul jeffpaul merged commit 8ba244b into develop Oct 14, 2021
@jeffpaul jeffpaul deleted the fix/homepage-tracking-sit-2447 branch October 14, 2021 12:27
Rahmon added a commit that referenced this pull request Oct 19, 2021
…ng-sit-2447"

This reverts commit 8ba244b, reversing
changes made to cc9113c.
Rahmon added a commit that referenced this pull request Oct 21, 2021
@Rahmon Rahmon mentioned this pull request Oct 21, 2021
6 tasks
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.

[SIT-2447] Option to ignore homepage data when sending content updates to Sophi
3 participants