Skip to content

Commit

Permalink
Fix Multi Attribution breaks mobile app (#5461)
Browse files Browse the repository at this point in the history
* Fix Multi Attribution breaks mobile app

* make sure default demo works

* downgrade sdk to 12.5.1 as various clicks are not working with 12.6.1
  • Loading branch information
tsteur authored Dec 23, 2024
1 parent 8e02f13 commit c4011f3
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/assets/mobileweb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This plugins provides a UI optimized for smartphones and tablets. It works for m

### Limitations

There is currently only one limitation due to the Same Origin Policy. You can add only Piwik accounts that belong to the same protocol and some host under which the mobile app is running. For instance if Piwik Mobile is running under “http://piwik.example.com/mobileweb”, you can only add Piwik accounts from “http://piwik.example.com/” and not accounts from let’s say “http://demo.matomo.org.
There is currently only one limitation due to the Same Origin Policy. You can add only Piwik accounts that belong to the same protocol and some host under which the mobile app is running. For instance if Piwik Mobile is running under “http://piwik.example.com/mobileweb”, you can only add Piwik accounts from “http://piwik.example.com/” and not accounts from let’s say “http://demo.matomo.cloud.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/visitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var args = arguments[0] || {};
var visitor = args.visitor;

var accountModel = require('session').getAccount();
var accessUrl = accountModel ? accountModel.getBasePath() : 'https://demo.matomo.org/';
var accessUrl = accountModel ? accountModel.getBasePath() : 'https://demo.matomo.cloud/';

var rows = [];

Expand Down Expand Up @@ -758,4 +758,4 @@ function createEcommerceAction(actionDetail, visitor, accessUrl)
row = null;
actionDetail = null;
visitor = null;
}
}
2 changes: 1 addition & 1 deletion app/controllers/visitor_overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function L(key)
}

var args = arguments[0] || {};
var accessUrl = args.account ? args.account.getBasePath() : 'https://demo.matomo.org/';
var accessUrl = args.account ? args.account.getBasePath() : 'https://demo.matomo.cloud/';
var visitor = args.visitor || null;

function goalConversionDescription(visitor)
Expand Down
2 changes: 1 addition & 1 deletion app/lib/Piwik/Network/HttpRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @example
* var request = require('Piwik/Network/HttpRequest');
* request.setBaseUrl('http://demo.matomo.org/');
* request.setBaseUrl('http://demo.matomo.cloud/');
* request.setParameter({siteId: 5});
* request.setCallback(function (response, parameters) {});
* request.handle();
Expand Down
2 changes: 1 addition & 1 deletion app/lib/i18n/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ module.exports = {
Mobile_Advanced: 'Advanced',
Mobile_AnonymousAccess: 'Anonymous access',
Mobile_AnonymousTracking: 'Anonymous tracking',
Mobile_AccessUrlLabel: 'URL eg https://demo.matomo.org',
Mobile_AccessUrlLabel: 'URL eg https://demo.matomo.cloud',
Mobile_AskForAnonymousTrackingPermission: 'When enabled, Matomo Mobile will send anonymous usage data to matomo.org. The intent is to use this data to help Matomo Mobile developers better understand how the app is used. Information sent is: menus and settings clicked on, OS name and version, any error displayed in Matomo Mobile. We will NOT track any of your analytics data. This anonymous data will never be made public. You can disable/enable anonymous tracking in Settings at any time.',
Mobile_ChooseHttpTimeout: 'Choose HTTP timeout value',
Mobile_ChooseMetric: 'Choose Metric',
Expand Down
1 change: 1 addition & 0 deletions app/models/piwikReports.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ exports.definition = {
}

this.config.defaultParams.urls[0].idSites = siteModel.get('idsite');
this.config.defaultParams.urls[0].idSite = siteModel.get('idsite');
this.config.defaultParams.urls[1].idSite = siteModel.get('idsite');

this.abortRunningRequests();
Expand Down
10 changes: 5 additions & 5 deletions tiapp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<target device="ipad">true</target>
<target device="android">true</target>
</deployment-targets>
<sdk-version>12.0.0.GA</sdk-version>
<sdk-version>12.5.1.GA</sdk-version>
<id>org.piwik.mobile2</id>
<name>Matomo Mobile 2</name>
<version>2.5.2</version>
<version>2.5.5</version>
<publisher>thomassteur</publisher>
<url>https://matomo.org/mobile</url>
<description>Need your analytics on the go? Use our free Matomo Mobile (formerly Piwik Mobile) app to check your stats from anywhere and show them to colleagues in meetings. Matomo Mobile offers all the same reports as the Matomo (Piwik) desktop interface, and displays your visitor data in real time!</description>
<copyright>2023 by matomo</copyright>
<copyright>2010 by matomo</copyright>
<icon>appicon.png</icon>
<persistent-wifi>false</persistent-wifi>
<prerendered-icon>true</prerendered-icon>
Expand Down Expand Up @@ -49,7 +49,7 @@
</plist>
</ios>
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:installLocation="preferExternal" android:versionCode="32" android:versionName="2.5.2">
<manifest android:installLocation="preferExternal" android:versionCode="35" android:versionName="2.5.5">
<application android:theme="@style/Theme.PiwikTheme">
<activity android:configChanges="keyboardHidden|orientation|screenSize" android:label="@string/app_name" android:name=".MatomoMobile2Activity" android:theme="@style/Theme.PiwikTheme">
<intent-filter>
Expand All @@ -59,7 +59,7 @@
</activity>
</application>
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" xlargeScreens="true"/>
<uses-sdk android:installLocation="preferExternal" android:minSdkVersion="29" android:targetSdkVersion="33"/>
<uses-sdk android:installLocation="preferExternal" android:minSdkVersion="29" android:targetSdkVersion="34"/>
</manifest>
</android>
<plugins>
Expand Down
4 changes: 2 additions & 2 deletions tools/findnewtranslationkeys/lib/findnewtranslationkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (readPathToI18nDirFromCommandLineArgument()) {
function getPiwikClient()
{
var PiwikClient = require('piwik-client');
return new PiwikClient('https://demo.matomo.org', 'anonymous');
return new PiwikClient('https://demo.matomo.cloud', 'anonymous');
}

function fetchEnglishTranslation()
Expand Down Expand Up @@ -87,4 +87,4 @@ function readPathToI18nDirFromCommandLineArgument()
function log(message)
{
require('sys').debug(message);
}
}
4 changes: 2 additions & 2 deletions tools/updatelanguagefiles/lib/updatelanguagefiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function updateTranslationsForAllAvailableLanguages(callback)
function getPiwikClient()
{
var PiwikClient = require('piwik-client');
return new PiwikClient('https://demo.matomo.org', 'anonymous');
return new PiwikClient('https://demo.matomo.cloud', 'anonymous');
}

function onAllAvailableLanguagesFetched(err, languages)
Expand Down Expand Up @@ -129,4 +129,4 @@ function writeTranslationKeysToFile(languageCode, translations)
function log(message)
{
require('sys').debug(message);
}
}

0 comments on commit c4011f3

Please sign in to comment.