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

Feature/219 rename to matomo #221

Merged
merged 12 commits into from
Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ before_install:
script:
- rake test
- rake build_with_package_manager
osx_image: xcode9
osx_image: xcode9.2
cache: cocoapods
50 changes: 25 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,45 @@
* **bugfix** Fixed an issue where an ampersand lead to incomplete tracking information. [#217](https://github.com/matomo-org/piwik-sdk-ios/issues/217)

## 4.4.1
* **bugfix** Fixed a crash happening due to concurrent access of the MemoryQueue. [#216](https://github.com/piwik/piwik-sdk-ios/pull/216)
* **bugfix** Fixed a crash happening due to concurrent access of the MemoryQueue. [#216](https://github.com/matomo-org/matomo-sdk-ios/pull/216)

## 4.4.0
* **feature** Added a way to add custom dimension in the action scope. [#111](https://github.com/piwik/piwik-sdk-ios/issues/111)
* **feature** Added automatic generation of the url property. [#197](https://github.com/piwik/piwik-sdk-ios/issues/197)
* **improvement** The PiwikTracker is now save to create in a background thread. [#175](https://github.com/piwik/piwik-sdk-ios/pull/175)
* **improvement** The Logger is now objc compatible. [#185](https://github.com/piwik/piwik-sdk-ios/issues/185)
* **improvement** Default `example.com` urls aren't generated anymore. [#194](https://github.com/piwik/piwik-sdk-ios/pull/195)
* **improvement** The Device and Applications structs are now public. [#191](https://github.com/piwik/piwik-sdk-ios/issues/191)
* **feature** Added a way to add custom dimension in the action scope. [#111](https://github.com/matomo-org/matomo-sdk-ios/issues/111)
* **feature** Added automatic generation of the url property. [#197](https://github.com/matomo-org/matomo-sdk-ios/issues/197)
* **improvement** The PiwikTracker is now save to create in a background thread. [#175](https://github.com/matomo-org/matomo-sdk-ios/pull/175)
* **improvement** The Logger is now objc compatible. [#185](https://github.com/matomo-org/matomo-sdk-ios/issues/185)
* **improvement** Default `example.com` urls aren't generated anymore. [#194](https://github.com/matomo-org/matomo-sdk-ios/pull/195)
* **improvement** The Device and Applications structs are now public. [#191](https://github.com/matomo-org/matomo-sdk-ios/issues/191)

## 4.3.0
* **feature** Added the ability to send custom events with custom tracking parameters. [#153](https://github.com/piwik/piwik-sdk-ios/issues/153)
* **bugfix** Fixed a crash when initializing a new tracker. [#162](https://github.com/piwik/piwik-sdk-ios/issues/162)
* **bugfix** Removed old, unused AFNetworking Submodule to fix Carthage usage. [#190](https://github.com/piwik/piwik-sdk-ios/issues/190)
* **feature** Added the ability to send custom events with custom tracking parameters. [#153](https://github.com/matomo-org/matomo-sdk-ios/issues/153)
* **bugfix** Fixed a crash when initializing a new tracker. [#162](https://github.com/matomo-org/matomo-sdk-ios/issues/162)
* **bugfix** Removed old, unused AFNetworking Submodule to fix Carthage usage. [#190](https://github.com/matomo-org/matomo-sdk-ios/issues/190)

## 4.2.0
* **feature** Added ability to customize user agent. [#168](https://github.com/piwik/piwik-sdk-ios/pull/168)
* **feature** Added ability to customize user agent. [#168](https://github.com/matomo-org/matomo-sdk-ios/pull/168)
* **feature** Added ability to customize User ID.
[#180](https://github.com/piwik/piwik-sdk-ios/issues/180) (by @niksawtschuk)
* **feature** Added Carthage support [#74](https://github.com/piwik/piwik-sdk-ios/issues/74) (by @elitalon)
* **feature** Added a way to set a custom visitor ID [#180](https://github.com/piwik/piwik-sdk-ios/pull/181) (by @niksawtschuk)
[#180](https://github.com/matomo-org/matomo-sdk-ios/issues/180) (by @niksawtschuk)
* **feature** Added Carthage support [#74](https://github.com/matomo-org/matomo-sdk-ios/issues/74) (by @elitalon)
* **feature** Added a way to set a custom visitor ID [#180](https://github.com/matomo-org/matomo-sdk-ios/pull/181) (by @niksawtschuk)
* **improvement** Added Swift support

## 4.1.0
* **feature** Added Custom Dimension Tracking for the Visit Scope. [#111](https://github.com/piwik/piwik-sdk-ios/issues/111)
* **feature** Transmitting the Screen resolution to the Piwik Backend. [#149](https://github.com/piwik/piwik-sdk-ios/issues/149) (by @akshaykolte)
* **feature** Added a Logger that can log messages in different levels. [#147](https://github.com/piwik/piwik-sdk-ios/issues/147)
* **feature** Added macOS and tvOS compatibility. [#134](https://github.com/piwik/piwik-sdk-ios/issues/134)
* **bugfix** Fixed a bug, where the tracker would stop automatic dispatching. [#167](https://github.com/piwik/piwik-sdk-ios/issues/167)
* **feature** Added Custom Dimension Tracking for the Visit Scope. [#111](https://github.com/matomo-org/matomo-sdk-ios/issues/111)
* **feature** Transmitting the Screen resolution to the Piwik Backend. [#149](https://github.com/matomo-org/matomo-sdk-ios/issues/149) (by @akshaykolte)
* **feature** Added a Logger that can log messages in different levels. [#147](https://github.com/matomo-org/matomo-sdk-ios/issues/147)
* **feature** Added macOS and tvOS compatibility. [#134](https://github.com/matomo-org/matomo-sdk-ios/issues/134)
* **bugfix** Fixed a bug, where the tracker would stop automatic dispatching. [#167](https://github.com/matomo-org/matomo-sdk-ios/issues/167)

## 4.0.0
* **feature** Renamed the Tracker to PiwikTracker. [#146](https://github.com/piwik/piwik-sdk-ios/issues/146)
* **feature** Added isOptedOut parameter to the PiwikTracker. [#124](https://github.com/piwik/piwik-sdk-ios/issues/124)
* **feature** Renamed the Tracker to PiwikTracker. [#146](https://github.com/matomo-org/matomo-sdk-ios/issues/146)
* **feature** Added isOptedOut parameter to the PiwikTracker. [#124](https://github.com/matomo-org/matomo-sdk-ios/issues/124)

## 4.0.0-beta2
* **feature** Added the possibility to set the url for a screen view event. [#92](https://github.com/piwik/piwik-sdk-ios/issues/92)
* **feature** Added the functionality to start new sessions. [#136](https://github.com/piwik/piwik-sdk-ios/issues/136)
* **fixed** The value of an event got wrongly encoded when dispatching. [#140](https://github.com/piwik/piwik-sdk-ios/pull/140)
* **fixed** Fixed an issue where tracking an event wasn’t possible from Objective-C code. [#142](https://github.com/piwik/piwik-sdk-ios/issues/142)
* **feature** Added the possibility to set the url for a screen view event. [#92](https://github.com/matomo-org/matomo-sdk-ios/issues/92)
* **feature** Added the functionality to start new sessions. [#136](https://github.com/matomo-org/matomo-sdk-ios/issues/136)
* **fixed** The value of an event got wrongly encoded when dispatching. [#140](https://github.com/matomo-org/matomo-sdk-ios/pull/140)
* **fixed** Fixed an issue where tracking an event wasn’t possible from Objective-C code. [#142](https://github.com/matomo-org/matomo-sdk-ios/issues/142)

## 4.0.0-beta1
* no changes
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ Welcome! We are very happy to have you here. There are always too many things to

Did you find a bug? Bummer! Please help us find the reason and fix them.

* Search on GitHub under [Issues](https://github.com/piwik/piwik-sdk-ios/issues) if it was already reported. Maybe you can add information to it?
* If you're unable to find an open issue addressing the problem, please [open a new one](https://github.com/piwik/piwik-sdk-ios/issues/new). Please explain your problem and include as much detail as you can as they might help the maintainers to reproduce it:
* Search on GitHub under [Issues](https://github.com/matomo-org/matomo-sdk-ios/issues) if it was already reported. Maybe you can add information to it?
* If you're unable to find an open issue addressing the problem, please [open a new one](https://github.com/matomo-org/matomo-sdk-ios/issues/new). Please explain your problem and include as much detail as you can as they might help the maintainers to reproduce it:
* A clear and descriptive title.
* Describe your issue and add exact steps to reproduce the issue. You found a crash? Please attach a symbolicated crash report.
* If possible add a few lines of code or possibly even an example project.

## Discussing

We love to discuss changes and improvements. If there is functionality you want to add or improve please [open an issue](https://github.com/piwik/piwik-sdk-ios/issues/new) and describe what you want to do, why and how. Maybe the feature already exists but is hidden? Maybe somebody wants to add ideas on how to implement it.
We love to discuss changes and improvements. If there is functionality you want to add or improve please [open an issue](https://github.com/matomo-org/matomo-sdk-ios/issues/new) and describe what you want to do, why and how. Maybe the feature already exists but is hidden? Maybe somebody wants to add ideas on how to implement it.

You are always welcome to add your thoughts to an existing [issue in discussion](https://github.com/piwik/piwik-sdk-ios/labels/discussion).
You are always welcome to add your thoughts to an existing [issue in discussion](https://github.com/matomo-org/matomo-sdk-ios/labels/discussion).

## Submitting changes

When contributing to this repository, please first discuss the change you wish to make via an issue before making a change.

If you implemented a change please send a [Pull Request](https://github.com/piwik/piwik-sdk-ios/compare?expand=1) with a clear list of what you have done. Try to only tackle one thing a time. This will lead to smaller pull requests that are easier to review.
If you implemented a change please send a [Pull Request](https://github.com/matomo-org/matomo-sdk-ios/compare?expand=1) with a clear list of what you have done. Try to only tackle one thing a time. This will lead to smaller pull requests that are easier to review.

## Contributing Code

Expand All @@ -34,7 +34,7 @@ You want to contribute code? Awesome. Here are some tips that should get you sta

### Adding code to the SDK

In the Workspace you will find the *PiwikTracker* Project. Inside of it there is a folder for the SDK code and one for the Tests. Tests can be run from the *PiwikTracker* scheme.
In the Workspace you will find the *MatomoTracker* Project. Inside of it there is a folder for the SDK code and one for the Tests. Tests can be run from the *MatomoTracker* scheme.

### Adding example code

Expand Down
18 changes: 9 additions & 9 deletions Example/ios/iOS Example/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import UIKit
import PiwikTracker
import MatomoTracker

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
setupPiwik()
setupMatomo()
return true
}

Expand All @@ -19,12 +19,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
PiwikTracker.shared?.dispatch()
MatomoTracker.shared?.dispatch()
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
PiwikTracker.shared?.startNewSession()
MatomoTracker.shared?.startNewSession()
}

func applicationDidBecomeActive(_ application: UIApplication) {
Expand All @@ -35,15 +35,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

func setupPiwik() {
guard let siteid = UserDefaults.standard.string(forKey: "piwik-example-siteid"),
let baseurl = UserDefaults.standard.url(forKey: "piwik-example-baseurl") else {
func setupMatomo() {
guard let siteid = UserDefaults.standard.string(forKey: "matomo-example-siteid"),
let baseurl = UserDefaults.standard.url(forKey: "matomo-example-baseurl") else {
let alert = UIAlertView(title: "Configuration", message: "Please configure this example application before usage", delegate: nil, cancelButtonTitle: "OK")
alert.show()
return
}
PiwikTracker.configureSharedInstance(withSiteID: siteid, baseURL: baseurl)
PiwikTracker.shared?.logger = DefaultLogger(minLevel: .info)
MatomoTracker.configureSharedInstance(withSiteID: siteid, baseURL: baseurl)
MatomoTracker.shared?.logger = DefaultLogger(minLevel: .info)
}

}
18 changes: 9 additions & 9 deletions Example/ios/iOS Example/ConfigurationViewController.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import UIKit
import PiwikTracker
import MatomoTracker

class ConfigurationViewController: UIViewController {

Expand All @@ -8,30 +8,30 @@ class ConfigurationViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
PiwikTracker.shared?.track(view: ["menu","configuration"])
MatomoTracker.shared?.track(view: ["menu","configuration"])

baseURLTextField.text = UserDefaults.standard.url(forKey: "piwik-example-baseurl")?.absoluteString
siteIDTextField.text = UserDefaults.standard.string(forKey: "piwik-example-siteid")
baseURLTextField.text = UserDefaults.standard.url(forKey: "matomo-example-baseurl")?.absoluteString
siteIDTextField.text = UserDefaults.standard.string(forKey: "matomo-example-siteid")
}

override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
guard let baseURLText = baseURLTextField.text,
let baseURL = URL(string: baseURLText),
let siteID = siteIDTextField.text else { return }
UserDefaults.standard.set(baseURL, forKey: "piwik-example-baseurl")
UserDefaults.standard.set(siteID, forKey: "piwik-example-siteid")
UserDefaults.standard.set(baseURL, forKey: "matomo-example-baseurl")
UserDefaults.standard.set(siteID, forKey: "matomo-example-siteid")
UserDefaults.standard.synchronize()

PiwikTracker.configureSharedInstance(withSiteID: siteID, baseURL: baseURL)
MatomoTracker.configureSharedInstance(withSiteID: siteID, baseURL: baseURL)
}

@IBAction func newSessionButtonTapped(_ sender: UIButton) {
PiwikTracker.shared?.startNewSession()
MatomoTracker.shared?.startNewSession()
}

@IBAction func dispatchButtonTapped(_ sender: UIButton) {
PiwikTracker.shared?.dispatch()
MatomoTracker.shared?.dispatch()
}

}
10 changes: 5 additions & 5 deletions Example/ios/iOS Example/CustomDimensionsViewController.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import UIKit
import PiwikTracker
import MatomoTracker

class CustomDimensionsViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
PiwikTracker.shared?.track(view: ["menu","custom dimensions"])
MatomoTracker.shared?.track(view: ["menu","custom dimensions"])
}

// Adds Custom Dimensions to every Event for OS version, Hardware and App version.
@IBAction func setVisitCustomDimensionsTapped(_ sender: UIButton) {
let application = Application.makeCurrentApplication()
let device = Device.makeCurrentDevice()
PiwikTracker.shared?.set(value: device.osVersion, forIndex: 1)
PiwikTracker.shared?.set(value: device.humanReadablePlatformName ?? device.platform, forIndex: 2)
PiwikTracker.shared?.set(value: application.bundleShortVersion ?? "unknown", forIndex: 3)
MatomoTracker.shared?.set(value: device.osVersion, forIndex: 1)
MatomoTracker.shared?.set(value: device.humanReadablePlatformName ?? device.platform, forIndex: 2)
MatomoTracker.shared?.set(value: application.bundleShortVersion ?? "unknown", forIndex: 3)
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import UIKit
import PiwikTracker
import MatomoTracker

class CustomTrackingParametersViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
PiwikTracker.shared?.track(view: ["menu","custom tracking parameters"])
MatomoTracker.shared?.track(view: ["menu","custom tracking parameters"])
}

@IBAction func didTapSendDownloadEvent(_ sender: UIButton) {
guard let piwikTracker = PiwikTracker.shared else { return }
let downloadURL = URL(string: "https://builds.piwik.org/piwik.zip")!
let event = Event(tracker: piwikTracker, action: ["menu", "custom tracking parameters"], url: downloadURL, customTrackingParameters: ["download": downloadURL.absoluteString])
PiwikTracker.shared?.track(event)
guard let matomoTracker = MatomoTracker.shared else { return }
let downloadURL = URL(string: "https://builds.matomo.org/matomo.zip")!
let event = Event(tracker: matomoTracker, action: ["menu", "custom tracking parameters"], url: downloadURL, customTrackingParameters: ["download": downloadURL.absoluteString])
MatomoTracker.shared?.track(event)
}

}
Expand Down
6 changes: 3 additions & 3 deletions Example/ios/iOS Example/EventsViewController.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import UIKit
import PiwikTracker
import MatomoTracker

class EventsViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
PiwikTracker.shared?.track(view: ["menu","events"])
MatomoTracker.shared?.track(view: ["menu","events"])
}
@IBAction func trackEventButtonTapped(_ sender: UIButton) {
PiwikTracker.shared?.track(eventWithCategory: "TestCategory", action: "TestAction", name: "TestName", value: 7)
MatomoTracker.shared?.track(eventWithCategory: "TestCategory", action: "TestAction", name: "TestName", value: 7)
}
}
4 changes: 2 additions & 2 deletions Example/ios/iOS Example/MenuViewController.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import UIKit
import PiwikTracker
import MatomoTracker

class MenuViewController: UITableViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
PiwikTracker.shared?.track(view: ["menu"])
MatomoTracker.shared?.track(view: ["menu"])
}
}
14 changes: 7 additions & 7 deletions Example/ios/iOS Example/ObjectiveCCompatibilityChecker.m
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
@import PiwikTracker;
@import MatomoTracker;

#import "ObjectiveCCompatibilityChecker.h"

@implementation ObjectiveCCompatibilityChecker

- (void)check {
[PiwikTracker configureSharedInstanceWithSiteID:@"5" baseURL:[NSURL URLWithString:@"http://example.com/piwik.php"] userAgent:nil];
[[PiwikTracker shared] trackWithView:@[@"example"] url:nil];
[[PiwikTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil url:nil];
[[PiwikTracker shared] dispatch];
[PiwikTracker shared].logger = [[DefaultLogger alloc] initWithMinLevel:LogLevelVerbose];
[MatomoTracker configureSharedInstanceWithSiteID:@"5" baseURL:[NSURL URLWithString:@"http://example.com/piwik.php"] userAgent:nil];
[[MatomoTracker shared] trackWithView:@[@"example"] url:nil];
[[MatomoTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil url:nil];
[[MatomoTracker shared] dispatch];
[MatomoTracker shared].logger = [[DefaultLogger alloc] initWithMinLevel:LogLevelVerbose];
}

- (void)checkDeprecated {
[[PiwikTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil];
[[MatomoTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil];
}

@end
Loading