-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Added site detection for cloudflare and updated noData page to mention cloudflare #20566
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
Conversation
…n cloudflare, #PG-2726
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. I only had a few minor comments. When I viewed the UI, things looked good. I noticed that it showed as detecting Cloudflare without me having to set the headers or anything, but it looks like it was showing as detecting GA as well. Is that part of being in development mode?
<p> Matomo URL: <code vue-directive="CoreHome.SelectOnFocus">{{ piwikUrl }}</code></p> | ||
<p> {{ 'SitesManager_EmailInstructionsYourSiteId'|translate('<code vue-directive="CoreHome.SelectOnFocus">' ~ idSite ~ '</code>')|raw }}</p> | ||
<p>8. {{ 'SitesManager_SiteWithoutDataCloudflareFollowStep8'|translate }}</p> | ||
<p>9. {{ 'SitesManager_SiteWithoutDataCloudflareFollowStep9'|translate }}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would using an ordered list (<ol>
) instead of manual numbering format things a little more nicely here? I think it might make it so that you don't have to use
to indent the extra lines under line 7 as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snake14 spacing and all was breaking and that was the reason I didn't use that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind that we als have rtl languages where such spacing might not make sense. Also using an ordered list would make more sense for those languages, as the numbers might need to be placed on the other side or would be written with Romanian numbers. If you have problems with the layout its better to use css instead of trying to "fix" something using spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to ol
, please check again
@snake14 no its not by default, can you check the URL of your idsite, and if you CURL that url will you get those required headers? |
<p> Matomo URL: <code vue-directive="CoreHome.SelectOnFocus">{{ piwikUrl }}</code></p> | ||
<p> {{ 'SitesManager_EmailInstructionsYourSiteId'|translate('<code vue-directive="CoreHome.SelectOnFocus">' ~ idSite ~ '</code>')|raw }}</p> | ||
<p>8. {{ 'SitesManager_SiteWithoutDataCloudflareFollowStep8'|translate }}</p> | ||
<p>9. {{ 'SitesManager_SiteWithoutDataCloudflareFollowStep9'|translate }}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind that we als have rtl languages where such spacing might not make sense. Also using an ordered list would make more sense for those languages, as the numbers might need to be placed on the other side or would be written with Romanian numbers. If you have problems with the layout its better to use css instead of trying to "fix" something using spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some more comments. In addition to that it might be helpful to also add a UI test around that. There are already a couple of tests around empty site detection. E.g. https://github.com/matomo-org/matomo/blob/71dcd54e1b70916cc61f5815352234308a4b8823/tests/UI/specs/EmptySite_GA4_spec.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look alright to me. The links have been updated to the actual FAQ URL.
plugins/SitesManager/lang/en.json
Outdated
"SiteWithoutDataCloudflare": "Cloudflare", | ||
"SiteWithoutDataCloudflareDescription": "You can use the Matomo App in Cloudflare to track data, follow the instructions from this %1$sguide%2$s.", | ||
"SiteWithoutDataCloudflareIntro": "If you use Cloudflare, you can start tracking data in Matomo seamlessly using the Matomo app available on Cloudflare.", | ||
"SiteWithoutDataCloudflareFollowStepsIntro": "Follow this steps to set it up:", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"SiteWithoutDataCloudflareFollowStepsIntro": "Follow this steps to set it up:", | |
"SiteWithoutDataCloudflareFollowStepsIntro": "Follow these steps to set it up:", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Stan-vw This change looks good to you ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'steps' is a plural noun, therefore requires a plural demonstrative, 'this step' vs 'these steps'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small tweaks:
"SiteWithoutDataCloudflare": "Cloudflare",
"SiteWithoutDataCloudflareDescription": "You can use the Matomo App in Cloudflare to track data, follow the instructions from %1$sthis guide%2$s.",
"SiteWithoutDataCloudflareIntro": "If you use Cloudflare, you can start tracking data in Matomo seamlessly using the Matomo App available in Cloudflare.",
"SiteWithoutDataCloudflareFollowStepsIntro": "Follow these steps to set it up:",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, you gotta teach me how to make the text so beautiful 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated as suggested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Stan-vw If you find the lines to tweak on the 'Files Changed' tab up top, then click the blue + by the line number (or drag for multiple lines) it will add a comment against those lines, in the comment box that appears, on the toolbar, there is a page icon with a plus/minus symbol which will add a copy of the lines as a suggestion in the comment edit box, you can then edit this copy of the lines to what you think they should be.
This way they get formatted nicely, can be seen as a 'diff' on the files changes list, can be committed in a single click with attribution and it also creates a comment on the main conversation page here 🙂
@sgiehl Added UI test and deleted unwanted file |
{% if ga4Used %} | ||
{{ 'SitesManager_GA4DetectedEmail'|translate('Google Analytics 4', 'GA', 'https://matomo.org/faq/how-to/migrate-from-google-analytics-4-to-matomo/')|raw }} | ||
{{ 'SitesManager_GADetectedEmail'|translate('Google Analytics 4', 'GA', 'https://matomo.org/faq/how-to/migrate-from-google-analytics-4-to-matomo/')|raw }} | ||
{{ 'CoreAdminHome_JSTracking_ConsentManagerEmailNote'|translate }} | ||
{% endif %} | ||
|
||
{% if gtmUsed %} | ||
{{ 'SitesManager_GTMDetectedEmail'|translate('Google Tag Manager', 'GTM', 'https://matomo.org/faq/tag-manager/migrating-from-google-tag-manager/')|raw }} | ||
{{ 'SitesManager_GTMDetectedEmail'|translate('https://matomo.org/faq/tag-manager/migrating-from-google-tag-manager/')|raw }} | ||
{{ 'CoreAdminHome_JSTracking_ConsentManagerEmailNote'|translate }} | ||
{% endif %} | ||
|
||
|
||
{% if cloudflare %} | ||
{{ 'SitesManager_CloudflareDetectedEmail'|translate('https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-my-cloudflare-setup/')|raw }} | ||
{{ 'CoreAdminHome_JSTracking_ConsentManagerEmailNote'|translate }} | ||
{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might actually look a bit weird in the email, as if multiple stuff is detected each will be displayed with the sentence Or you could directly embed the tracking code in your website instead:
in the end.
But I guess improving this generated email (content) might be part of another issue maybe?
ping @Stan-vw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to improve this email but since we want to ship these changes as quickly as possible I'm ok with the last email format.
@AltamashShaikh, give me a call when you're up, would be good for me to understand how we can iterate this email 👍
cc: @Javi-Ormaechea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left another minor comment, that might not be part of this issue.
Otherwise this looks good to merge for me.
…n cloudflare (#20566) * Added site detection for cloudflare and updated noData page to mention cloudflare, #PG-2726 * UI fixes * PR ceomments resolution * Changed to ol from p * Spacing for url and idsite fixed * Updated with FAQ url * Updated logic for updatedTab * Created UI test for cloudflare * UI test case updated * Updated UI screenshots * textual changes * Updated UI screenshot * Updated UI screenshot * Tracking email code fixed
…n cloudflare (#20573) * Added site detection for cloudflare and updated noData page to mention cloudflare (#20566) * Added site detection for cloudflare and updated noData page to mention cloudflare, #PG-2726 * UI fixes * PR ceomments resolution * Changed to ol from p * Spacing for url and idsite fixed * Updated with FAQ url * Updated logic for updatedTab * Created UI test for cloudflare * UI test case updated * Updated UI screenshots * textual changes * Updated UI screenshot * Updated UI screenshot * Tracking email code fixed * Cherrypicked Cloudflare changes from 5.x-dev * Removed uneanted lines added due to merge
Description:
Added site detection for cloudflare and updated noData page to mention cloudflare.
Fiixes: #PG-2726.
Review