diff options
Diffstat (limited to 'plugins/SitesManager/templates')
-rw-r--r-- | plugins/SitesManager/templates/_siteWithoutDataTabs.twig | 87 | ||||
-rw-r--r-- | plugins/SitesManager/templates/siteWithoutData.twig | 89 |
2 files changed, 99 insertions, 77 deletions
diff --git a/plugins/SitesManager/templates/_siteWithoutDataTabs.twig b/plugins/SitesManager/templates/_siteWithoutDataTabs.twig new file mode 100644 index 0000000000..6e50deb89e --- /dev/null +++ b/plugins/SitesManager/templates/_siteWithoutDataTabs.twig @@ -0,0 +1,87 @@ +<script type="text/javascript"> + $(document).ready(function(){ + $('.tabs').tabs(); + }); +</script> + +<div class="row"> + <div class="col s12"> + <ul class="tabs"> + <li class="tab col s3"><a {% if siteType != constant('Piwik\\Plugins\\SitesManager\\SitesManager::SITE_TYPE_UNKNOWN') %} class="active" {% endif %} href="#integrations">{{ 'SitesManager_Integrations'|translate }}</a></li> + <li class="tab col s3"><a {% if siteType == constant('Piwik\\Plugins\\SitesManager\\SitesManager::SITE_TYPE_UNKNOWN') %} class="active" {% endif %} href="#tracking-code">{{ 'CoreAdminHome_TrackingCode'|translate}}</a></li> + <li class="tab col s3"><a href="#mtm">{{ 'SitesManager_SiteWithoutDataMatomoTagManager'|translate}}</a></li> + <li class="tab col s3"><a href="#other">{{ 'SitesManager_SiteWithoutDataOtherWays'|translate }}</a></li> + </ul> + </div> + + <div id="integrations" class="col s12"> + <h3>{{ 'SitesManager_Integrations'|translate }}</h3> + {% if siteType != constant('Piwik\\Plugins\\SitesManager\\SitesManager::SITE_TYPE_UNKNOWN') and instructionUrl %} + <p>{{ 'SitesManager_SiteWithoutDataDetectedSite'|translate(siteType|capitalize, '<a target="_blank" rel="noreferrer noopener" href="' ~ instructionUrl ~ '">','</a>')|raw }}</p> + + {% if gtmUsed %} + <p>{{ 'SitesManager_SiteWithoutDataDetectedGtm'|translate(siteType|capitalize, '<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-within-gtm-google-tag-manager">','</a>')|raw }}</p> + {% endif %} + + <p>{{ 'SitesManager_SiteWithoutDataOtherIntegrations'|translate }}: {{ 'CoreAdminHome_JSTrackingIntro3a'|translate('<a href="https://matomo.org/integrate/" rel="noreferrer noopener" target="_blank">','</a>')|raw }}</p> + {% else %} + <p>{{ 'SitesManager_InstallationGuidesIntro'|translate }} + + <p> + <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-wordpress/'>WordPress</a> + | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-integrate-matomo-with-squarespace-website/'>Squarespace</a> + | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-wix/'>Wix</a> + | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/how-to-install/faq_19424/'>SharePoint</a> + | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-joomla/'>Joomla</a> + | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-my-shopify-store/'>Shopify</a> + | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-within-gtm-google-tag-manager/'>Google Tag Manager</a> + </p> + + <p>{{ 'CoreAdminHome_JSTrackingIntro3a'|translate('<a href="https://matomo.org/integrate/" rel="noreferrer noopener" target="_blank">','</a>')|raw }}</p> + <p>{{ 'CoreAdminHome_JSTrackingIntro3b'|translate|raw }}</p> + <br> + <p>{{ 'SitesManager_ExtraInformationNeeded'|translate }}</p> + <p>Matomo URL: <code piwik-select-on-focus>{{ piwikUrl }}</code></p> + <p>{{ 'SitesManager_EmailInstructionsYourSiteId'|translate('<code piwik-select-on-focus>' ~ idSite ~ '</code>')|raw }}</p> + {% endif %} + </div> + + <div id="tracking-code" class="col s12"> + <h3>{{ 'CoreAdminHome_TrackingCode'|translate}}</h3> + + <p>{{ 'CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead'|translate("</head>")|raw }}</p> + + <pre piwik-select-on-focus>{{ jsTag|raw }}</pre> + + <p>{{ 'CoreAdminHome_JSTrackingIntro5'|translate('<a rel="noreferrer noopener" target="_blank" href="https://developer.matomo.org/guides/tracking-javascript-guide">','</a>')|raw }}</p> + + <p>{{ 'CoreAdminHome_JSTracking_EndNote'|translate('<a href="' ~ linkTo({'module': 'CoreAdminHome', 'action': 'trackingCodeGenerator'}) ~'">','</a>')|raw }}</p> + </div> + + <div id="mtm" class="col s12"> + {% if tagManagerActive %} + {{ postEvent('Template.endTrackingCodePage') }} + {% else %} + <h3>{{ 'SitesManager_SiteWithoutDataMatomoTagManager'|translate }}</h3> + <p>{{ 'SitesManager_SiteWithoutDataMatomoTagManagerNotActive'|translate('<a href="https://matomo.org/docs/tag-manager/" rel="noreferrer noopener" target="_blank">', '</a>')|raw }}</p> + {% endif %} + </div> + + <div id="other" class="col s12"> + <h3>{{ 'SitesManager_LogAnalytics'|translate }}</h3> + <p>{{ 'SitesManager_LogAnalyticsDescription'|translate('<a href="https://matomo.org/log-analytics/" rel="noreferrer noopener" target="_blank">', '</a>')|raw }}</p> + + <h3>{{ 'SitesManager_MobileAppsAndSDKs'|translate }}</h3> + <p>{{ 'SitesManager_MobileAppsAndSDKsDescription'|translate('<a href="https://matomo.org/integrate/#programming-language-platforms-and-frameworks" rel="noreferrer noopener" target="_blank">','</a>')|raw }}</p> + + <h3>{{ 'CoreAdminHome_HttpTrackingApi'|translate }}</h3> + <p>{{ 'CoreAdminHome_HttpTrackingApiDescription'|translate('<a href="https://developer.matomo.org/api-reference/tracking-api" rel="noreferrer noopener" target="_blank">','</a>')|raw }}</p> + + <h3>{{ 'SitesManager_SiteWithoutDataGoogleTagManager'|translate }}</h3> + <p>{{ 'SitesManager_SiteWithoutDataGoogleTagManagerDescription'|translate('<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-within-gtm-google-tag-manager">','</a>')|raw }}</p> + + {% if googleAnalyticsImporterMessage is defined %} + {{ googleAnalyticsImporterMessage|raw }} + {% endif %} + </div> +</div> diff --git a/plugins/SitesManager/templates/siteWithoutData.twig b/plugins/SitesManager/templates/siteWithoutData.twig index 4f35259eec..f5da6d405f 100644 --- a/plugins/SitesManager/templates/siteWithoutData.twig +++ b/plugins/SitesManager/templates/siteWithoutData.twig @@ -27,92 +27,27 @@ <div class="site-without-data"> <div piwik-content-block content-title="{{ 'SitesManager_SiteWithoutDataTitle'|translate|e('html_attr') }}"> - <p> - {{ 'SitesManager_SiteWithoutDataDescription'|translate }} {{ 'Installation_JSTracking_Intro'|translate }} - {{ 'SitesManager_SiteWithoutDataSetupTracking'|translate('<a href="' ~ linkTo({ - 'module': 'CoreAdminHome', - 'action': 'trackingCodeGenerator', - }) ~ '">', "</a>")|raw }} - <br /> - <br /> - {{ 'SitesManager_SiteWithoutDataMessageDisappears'|translate }} - - </p> - - <div class='trackingHelp'> - {% if showMatomoLinks %} - <h3>{{ 'SitesManager_InstallationGuides'|translate }}</h3> - <p>{{ 'SitesManager_InstallationGuidesIntro'|translate }} - - <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-wordpress/'>WordPress</a> - | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-integrate-matomo-with-squarespace-website/'>Squarespace</a> - | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-wix/'>Wix</a> - | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/how-to-install/faq_19424/'>SharePoint</a> - | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-joomla/'>Joomla</a> - | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-my-shopify-store/'>Shopify</a> - | <a target="_blank" rel="noreferrer noopener" href='https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-within-gtm-google-tag-manager/'>Google Tag Manager</a> - <br > - <br > - {{ 'SitesManager_ExtraInformationNeeded'|translate }} - <br > - Matomo URL: <code piwik-select-on-focus>{{ piwikUrl }}</code> - <br > - {{ 'SitesManager_EmailInstructionsYourSiteId'|translate('<code piwik-select-on-focus>' ~ idSite ~ '</code>')|raw }} - <br > - </p> - {% endif %} - - <h3>{{ 'SitesManager_Integrations'|translate }}</h3> - - <p>{{ 'CoreAdminHome_JSTrackingIntro3a'|translate('<a href="https://matomo.org/integrate/" rel="noreferrer noopener" target="_blank">','</a>')|raw }} {{ 'CoreAdminHome_JSTrackingIntro3b'|translate|raw }}</p> - - <div class="valign-wrapper trackingHelpHeader"> - <div> - - <h3>{{ 'General_JsTrackingTag'|translate }}</h3> + <p>{{ 'SitesManager_SiteWithoutDataDescription'|translate('<a href="mailto:?subject=' ~ 'SitesManager_EmailInstructionsSubject'|translate|url_encode|e('html_attr') ~ '&body=' ~ emailBody|url_encode|e('html_attr') ~ '">', '</a>')|raw }}</p> + <p>{{ 'SitesManager_SiteWithoutDataMessageDisappears'|translate }}</p> - <p>{{ 'CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead'|translate("</head>")|raw }}</p> - </div> - <a class="btn" id="emailTrackingCodeBtn" - href="mailto:?subject={{ 'SitesManager_EmailInstructionsSubject'|translate|url_encode|e('html_attr') }}&body={{ emailBody|url_encode|e('html_attr') }}"> - {{ 'SitesManager_EmailInstructionsButton'|translate }} - </a> - </div> + <h3>{{ 'SitesManager_SiteWithoutDataChoosePreferredWay'|translate }}</h3> - <pre piwik-select-on-focus>{{ jsTag|raw }}</pre> + <div piwik-widget-loader='{"module":"SitesManager","action":"siteWithoutDataTabs"}' loading-message="{{ 'SitesManager_DetectingYourSite'|translate|e('html_attr') }}..."></div> - <p>{{ 'CoreAdminHome_JSTrackingIntro5'|translate('<a rel="noreferrer noopener" target="_blank" href="https://developer.matomo.org/guides/tracking-javascript-guide">','</a>')|raw }}</p> + <hr> - <p><br />{{ 'CoreAdminHome_JSTracking_EndNote'|translate('<a href="' ~ linkTo({'module': 'CoreAdminHome', 'action': 'trackingCodeGenerator'}) ~'">','</a>')|raw }} - <br /> - <br /> - <a href="{{ linkTo({module: 'CoreAdminHome', action: 'trackingCodeGenerator'}) }}"class="btn"><span class="icon-configure"></span> {{ 'SitesManager_CustomizeJavaScriptTracker'|translate }}</a></p> - - <h3>{{ 'SitesManager_LogAnalytics'|translate }}</h3> - - <p>{{ 'SitesManager_LogAnalyticsDescription'|translate('<a href="https://matomo.org/log-analytics/" rel="noreferrer noopener" target="_blank">', '</a>')|raw }}</p> - - <h3>{{ 'SitesManager_MobileAppsAndSDKs'|translate }}</h3> - - <p>{{ 'SitesManager_MobileAppsAndSDKsDescription'|translate('<a href="https://matomo.org/integrate/#programming-language-platforms-and-frameworks" rel="noreferrer noopener" target="_blank">','</a>')|raw }}</p> - - <h3>{{ 'CoreAdminHome_HttpTrackingApi'|translate }}</h3> - <p>{{ 'CoreAdminHome_HttpTrackingApiDescription'|translate('<a href="https://developer.matomo.org/api-reference/tracking-api" rel="noreferrer noopener" target="_blank">','</a>')|raw }}</p> - - {% if googleAnalyticsImporterMessage is defined %} - {{ googleAnalyticsImporterMessage|raw }} - {% endif %} - - {{ postEvent('Template.endTrackingHelpPage') }} - - </div> + <a class="btn" id="emailTrackingCodeBtn" + href="mailto:?subject={{ 'SitesManager_EmailInstructionsSubject'|translate|url_encode|e('html_attr') }}&body={{ emailBody|url_encode|e('html_attr') }}" + >{{ 'SitesManager_EmailInstructionsButton'|translate }}</a> {{ postEvent('Template.siteWithoutData.afterIntro') }} <br /> <br /> <a href="{{ linkTo({module: 'SitesManager', action: 'ignoreNoDataMessage'}) }}" - class="btn ignoreSitesWithoutData">{{ 'SitesManager_SiteWithoutDataIgnoreMessage'|translate }}</a> - + class="btn ignoreSitesWithoutData" + > + {{ 'SitesManager_SiteWithoutDataIgnoreMessage'|translate }} + </a> </div> {{ postEvent('Template.siteWithoutData.afterTrackingHelp') }} |