Skip to content

Commit

Permalink
Merge pull request #558 from matomo-org/PG-3912-remove-ga3-sunset-note
Browse files Browse the repository at this point in the history
Removed GA3 sunset note and added no hits note for Cloud, #PG-3912
  • Loading branch information
AltamashShaikh authored Dec 11, 2024
2 parents cbe2d0a + 2edf152 commit 06460ba
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 75 deletions.
5 changes: 3 additions & 2 deletions GoogleAnalyticsImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ public function getClientSideTranslationKeys(&$translationKeys)
$translationKeys[] = 'GoogleAnalyticsImporter_OauthFailedMessage';
$translationKeys[] = 'GoogleAnalyticsImporter_ConfigureImportNotificationMessage';
$translationKeys[] = 'GoogleAnalyticsImporter_ConfigureTheImporterHelp';
$translationKeys[] = 'GoogleAnalyticsImporter_ConfigureTheImporterHelpNewDate';
$translationKeys[] = 'GoogleAnalyticsImporter_ConfigureTheImporterLabel1';
$translationKeys[] = 'GoogleAnalyticsImporter_ConfigureTheImporterLabel2';
$translationKeys[] = 'GoogleAnalyticsImporter_ConfigureTheImporterLabel3';
Expand Down Expand Up @@ -446,14 +445,16 @@ public static function getConfigureConnectProps($nonce)
$jwt = ConnectHelper::buildOAuthStateJwt(SettingsPiwik::getPiwikInstanceId(), ConnectAccounts::INITIATED_BY_GA);
}
$googleAuthUrl = '';
$additionalHelpText = '';
if ($isConnectAccountsActivated) {
$googleAuthUrl = $authBaseUrl . Http::buildQuery(['module' => 'ConnectAccounts', 'action' => 'initiateOauth', 'state' => $jwt, 'strategy' => GoogleConnect::getStrategyName()]);
$additionalHelpText = Piwik::translate('GoogleAnalyticsImporter_NoteImportNotCountedAsHit', ['<strong>', '</strong>']);
}
$idSite = Request::fromRequest()->getIntegerParameter('idSite', 0);
// If for some reason the idSite query parameter isn't set, look up the default site ID
if ($idSite < 1) {
$idSite = StaticContainer::get(UserPreferences::class)->getDefaultWebsiteId();
}
return ['isConnectAccountsActivated' => $isConnectAccountsActivated, 'primaryText' => Piwik::translate('GoogleAnalyticsImporter_ConfigureTheImporterLabel1'), 'radioOptions' => !$isConnectAccountsActivated ? [] : ['connectAccounts' => Piwik::translate('ConnectAccounts_OptionQuickConnectWithGa'), 'manual' => Piwik::translate('ConnectAccounts_OptionAdvancedConnectWithGa')], 'googleAuthUrl' => $googleAuthUrl, 'manualConfigText' => Piwik::translate('GoogleAnalyticsImporter_ConfigureTheImporterLabel2') . '<br />' . Piwik::translate('GoogleAnalyticsImporter_ConfigureTheImporterLabel3', ['<a href="' . Url::addCampaignParametersToMatomoLink('https://matomo.org/faq/general/set-up-google-analytics-import/') . '" rel="noreferrer noopener" target="_blank">', '</a>']), 'manualConfigNonce' => $nonce, 'manualActionUrl' => Url::getCurrentUrlWithoutQueryString() . '?' . Http::buildQuery(['module' => 'GoogleAnalyticsImporter', 'action' => 'configureClient', 'idSite' => $idSite]), 'connectAccountsUrl' => $googleAuthUrl, 'connectAccountsBtnText' => Piwik::translate('ConnectAccounts_ConnectWithGoogleText'), 'additionalHelpText' => Piwik::translate('GoogleAnalyticsImporter_ConfigureTheImporterHelpNewDate', ['<strong>', '</strong>'])];
return ['isConnectAccountsActivated' => $isConnectAccountsActivated, 'primaryText' => Piwik::translate('GoogleAnalyticsImporter_ConfigureTheImporterLabel1'), 'radioOptions' => !$isConnectAccountsActivated ? [] : ['connectAccounts' => Piwik::translate('ConnectAccounts_OptionQuickConnectWithGa'), 'manual' => Piwik::translate('ConnectAccounts_OptionAdvancedConnectWithGa')], 'googleAuthUrl' => $googleAuthUrl, 'manualConfigText' => Piwik::translate('GoogleAnalyticsImporter_ConfigureTheImporterLabel2') . '<br />' . Piwik::translate('GoogleAnalyticsImporter_ConfigureTheImporterLabel3', ['<a href="' . Url::addCampaignParametersToMatomoLink('https://matomo.org/faq/general/set-up-google-analytics-import/') . '" rel="noreferrer noopener" target="_blank">', '</a>']), 'manualConfigNonce' => $nonce, 'manualActionUrl' => Url::getCurrentUrlWithoutQueryString() . '?' . Http::buildQuery(['module' => 'GoogleAnalyticsImporter', 'action' => 'configureClient', 'idSite' => $idSite]), 'connectAccountsUrl' => $googleAuthUrl, 'connectAccountsBtnText' => Piwik::translate('ConnectAccounts_ConnectWithGoogleText'), 'additionalHelpText' => $additionalHelpText];
}
}
5 changes: 2 additions & 3 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"GoogleAnalyticsImporter": {
"AdminMenuTitle": "Google Analytics Import",
"ConfigureTheImporter": "Configure the Importer",
"ConfigureTheImporterHelp": "%1$sNote:%2$s If you don't import your data, your Google Analytics 3 data will be permanently lost after December 31st, 2023.",
"ConfigureTheImporterHelpNewDate": "%1$sNote:%2$s If you don't import your data, your Google Analytics 3 data will be permanently lost after June 30th, 2024.",
"ConfigureTheImporterLabel1": "Import your Google Analytics properties and reporting data to create a backup and analyse them using Matomo’s powerful analytics tools. Once you connect the importer, select which Google Analytics properties to import and Matomo will automatically create a new website for each one.",
"ConfigureTheImporterLabel2": "In order to import your data from Google Analytics, Matomo need access to this data.",
"ConfigureTheImporterLabel3": "To start, %1$sfollow our instructions to retrieve your OAuth Client configuration%2$s. Then upload the client configuration file using the button below.",
Expand Down Expand Up @@ -158,6 +156,7 @@
"StreamIdFilterHelpText": "The Stream ID for which you want to import data. %1$sLearn more.%2$s %3$sNote:%4$s Leave this field blank to import data from all streams.",
"RecommendationTitle": "Import Google Analytics data to Matomo (recommended for you)",
"RecommendationText": "We have detected Google Analytics on your site, so you can set up Matomo by importing your Google Analytics data.",
"RecommendationButton": "Import data"
"RecommendationButton": "Import data",
"NoteImportNotCountedAsHit": "%1$sNote:%2$s Data imported through the Google Analytics Import does not count towards your hits quota."
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 06460ba

Please sign in to comment.