Skip to content

Commit

Permalink
Piwik PRO SDK for iOS VERSION 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mandrzej authored Sep 6, 2024
1 parent 8dbe82d commit b90879e
Show file tree
Hide file tree
Showing 15 changed files with 136 additions and 32 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Changelog
All notable changes to this project will be documented in this file.

## 2.0.0 - 05.09.2024

### Added
Cross-platform tracking features

The release will disable session hash support by default (sh=0 parameter).
The main reason is the high likelihood of mobile devices sharing altogether the same User-Agent header (due to visitors using the same mobile app) and the same public IP address due to being connected to the same network (e.g. shopping malls, train stations, airports). The more densely the area is populated, the more it impacts the quality of data collection. Another important reason is that the cookie ID (primary visitor identifier) is much less likely to change when using mobile SDKs compared to the browser environment.
Documentation with instructions on how to configure the cross-platform feature should appear soon in the Help Center.

- properties `sessionHash` to control the SessionHash feature, `userAgent` for accessing the user agent used in the SDK
- new methods dedicated to cross-platform tracking `setVisitorIdFromDeepLink`, `setVisitorIdFromURL`

## 1.2.5 - 10.06.2024

### Added
Expand Down
2 changes: 1 addition & 1 deletion PiwikPROSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

s.name = "PiwikPROSDK"
s.version = "1.2.5"
s.version = "2.0.0"
s.summary = "Piwik PRO SDK for iOS"

s.description = "SDK for iOS to measure your apps with Piwik PRO"
Expand Down
Binary file modified PiwikPROSDK.xcframework/_CodeSignature/CodeDirectory
Binary file not shown.
Binary file modified PiwikPROSDK.xcframework/_CodeSignature/CodeRequirements-1
Binary file not shown.
54 changes: 27 additions & 27 deletions PiwikPROSDK.xcframework/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</data>
<key>ios-arm64/PiwikPROSDK.framework/Headers/PiwikTracker.h</key>
<data>
qGb0Q1BaQ2aBtjil5Y0ctSH+CeY=
0EW1ewGiGgSeLPEEep6zjlVdHc4=
</data>
<key>ios-arm64/PiwikPROSDK.framework/Headers/PiwikTransaction.h</key>
<data>
Expand All @@ -42,15 +42,15 @@
</data>
<key>ios-arm64/PiwikPROSDK.framework/Info.plist</key>
<data>
1knUeQ3pQhsc694w/DKn3SFulBI=
Ctpuwwb5ujLJot5QHgJFTTWMqU8=
</data>
<key>ios-arm64/PiwikPROSDK.framework/Modules/module.modulemap</key>
<data>
lU/JW1hg7fmp9s8soaN917OTVus=
</data>
<key>ios-arm64/PiwikPROSDK.framework/PiwikPROSDK</key>
<data>
6Y+InBzHB1TAV1BvDo3Oi4krk9M=
jBQkrs51FSLCToYqyf1Ccs9AIe8=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/Headers/EcommerceProducts.h</key>
<data>
Expand All @@ -70,7 +70,7 @@
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/Headers/PiwikTracker.h</key>
<data>
qGb0Q1BaQ2aBtjil5Y0ctSH+CeY=
0EW1ewGiGgSeLPEEep6zjlVdHc4=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/Headers/PiwikTransaction.h</key>
<data>
Expand All @@ -90,31 +90,31 @@
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/Info.plist</key>
<data>
i0lKUL0otDQvNxY+bGsjTvGYOJw=
Umk0BzsM6OogWXeayISslzfL97A=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/Modules/module.modulemap</key>
<data>
lU/JW1hg7fmp9s8soaN917OTVus=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/PiwikPROSDK</key>
<data>
UFE5yn6SxJKhZNhxY2a5ABjCM98=
wH4tDOa2cjkXDJ+DBiGOpMcZPTc=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeDirectory</key>
<data>
CdzI1x7PWHgd+uhQq6d0JISOMvM=
atv3EwS4K5C4ockoI5mlBbAMkTM=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeRequirements</key>
<data>
OnX22wWFKRSOFN1+obRynMCeyXM=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeRequirements-1</key>
<data>
ypLq2yPyyUoGcj+e/DcyXDthoao=
uNp1DwKGYwDk6PuPZ5BPXhPQWMM=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeResources</key>
<data>
AA8DRGGYXXKdaAVePdXbBzKvXHw=
XkIVdTGH8vcLNzYLLTQ9qJEkh4U=
</data>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeSignature</key>
<data>
Expand Down Expand Up @@ -171,11 +171,11 @@
<dict>
<key>hash</key>
<data>
qGb0Q1BaQ2aBtjil5Y0ctSH+CeY=
0EW1ewGiGgSeLPEEep6zjlVdHc4=
</data>
<key>hash2</key>
<data>
ttdiLcemPC8u4etx8UVqOCyZ5V7ykYqatO0uIXsfk9w=
R8Q9FFHbnfr16Smf0y2I1zqnv9imPNVjQOxZ533JJxk=
</data>
</dict>
<key>ios-arm64/PiwikPROSDK.framework/Headers/PiwikTransaction.h</key>
Expand Down Expand Up @@ -226,11 +226,11 @@
<dict>
<key>hash</key>
<data>
1knUeQ3pQhsc694w/DKn3SFulBI=
Ctpuwwb5ujLJot5QHgJFTTWMqU8=
</data>
<key>hash2</key>
<data>
a7053eMR+w1K2Co8Sb5AtK2/YiS+9fpTdhhdEwCo/Wg=
7k1tfWLp+EVLtMx2Fz2MWCoWL/BrihfoNNdbcZOkCk0=
</data>
</dict>
<key>ios-arm64/PiwikPROSDK.framework/Modules/module.modulemap</key>
Expand All @@ -248,11 +248,11 @@
<dict>
<key>hash</key>
<data>
6Y+InBzHB1TAV1BvDo3Oi4krk9M=
jBQkrs51FSLCToYqyf1Ccs9AIe8=
</data>
<key>hash2</key>
<data>
n99IRE8DSiz/9GvaBnlMJKdmgxduxZV4mBod28+7jH8=
8ca7a8BR8fjnbuiiTIXvAcNLa7Htm/WkJ8MPRo4uXt0=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/Headers/EcommerceProducts.h</key>
Expand Down Expand Up @@ -303,11 +303,11 @@
<dict>
<key>hash</key>
<data>
qGb0Q1BaQ2aBtjil5Y0ctSH+CeY=
0EW1ewGiGgSeLPEEep6zjlVdHc4=
</data>
<key>hash2</key>
<data>
ttdiLcemPC8u4etx8UVqOCyZ5V7ykYqatO0uIXsfk9w=
R8Q9FFHbnfr16Smf0y2I1zqnv9imPNVjQOxZ533JJxk=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/Headers/PiwikTransaction.h</key>
Expand Down Expand Up @@ -358,11 +358,11 @@
<dict>
<key>hash</key>
<data>
i0lKUL0otDQvNxY+bGsjTvGYOJw=
Umk0BzsM6OogWXeayISslzfL97A=
</data>
<key>hash2</key>
<data>
Fae+IsRC/F+LH6Ww9JpzpSh0CuZixwTQiQ2dS4BwXaU=
uOzk8HS2uJc7fnWvn7vf1QhMIEWLSIHfnoe8aDBDcUI=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/Modules/module.modulemap</key>
Expand All @@ -380,22 +380,22 @@
<dict>
<key>hash</key>
<data>
UFE5yn6SxJKhZNhxY2a5ABjCM98=
wH4tDOa2cjkXDJ+DBiGOpMcZPTc=
</data>
<key>hash2</key>
<data>
qn7OFBewIpmG8/0NORBOfpKv6f9MguGStwVHchuCc1k=
NII7oILZ3Iklgjwchs1JzWbtukLM4TOcoGu4hSwYXvA=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeDirectory</key>
<dict>
<key>hash</key>
<data>
CdzI1x7PWHgd+uhQq6d0JISOMvM=
atv3EwS4K5C4ockoI5mlBbAMkTM=
</data>
<key>hash2</key>
<data>
BHzjcU5HdyC7lhkVFQSv5GXJ40Llt7Dw0wjMwn2YYYk=
OfxCxZ+IneClpG3K+MTemGuGOJgnosZ6PA3hJvrausU=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeRequirements</key>
Expand All @@ -413,22 +413,22 @@
<dict>
<key>hash</key>
<data>
ypLq2yPyyUoGcj+e/DcyXDthoao=
uNp1DwKGYwDk6PuPZ5BPXhPQWMM=
</data>
<key>hash2</key>
<data>
HNBUS4bpYKnVWPAZozhko1LUQgliWUwwNNcgz0Mbzz4=
w5A1wHpRBA4ioYKN3Z7v85QC/5Gu83UbUFiETMr1+jo=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeResources</key>
<dict>
<key>hash</key>
<data>
AA8DRGGYXXKdaAVePdXbBzKvXHw=
XkIVdTGH8vcLNzYLLTQ9qJEkh4U=
</data>
<key>hash2</key>
<data>
Cy0jqSOkMfTZHBPV+9sLXqUQMkpvqZ2uyq8zgj3tk7o=
rzVovANUkPfIS9aYG273okKq3vV/uAsaGnUtrW8jdsc=
</data>
</dict>
<key>ios-arm64_x86_64-simulator/PiwikPROSDK.framework/_CodeSignature/CodeSignature</key>
Expand Down
Binary file modified PiwikPROSDK.xcframework/_CodeSignature/CodeSignature
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ typedef NS_ENUM(NSUInteger, CustomVariableScope)
CustomVariableScopeAction NS_SWIFT_NAME(action),
};

typedef NS_ENUM(NSUInteger, SessionHash)
{
Disabled NS_SWIFT_NAME(disabled),
Enabled NS_SWIFT_NAME(enabled),
NotSet NS_SWIFT_NAME(notSet),
};

//MARK: - Tracker instance

/**
Expand Down Expand Up @@ -122,6 +129,11 @@ typedef NS_ENUM(NSUInteger, CustomVariableScope)
*/
@property (nonnull, nonatomic, readonly) NSString *visitorID;

/**
* Internal user agent used for data transmission between the Piwik Pro SDK and the Tracker.
*/
@property (nonnull, nonatomic, readonly) NSString *userAgent;

/**
The device ID is used to track the IDFA (identifier for advertising). IDFA is an additional non empty unique string identifying the device. If you want to use IDFA for tracking then you should set this property to IDFA by yourself (by default it is nil). You can read IDFA from the device as below:
Expand Down Expand Up @@ -155,6 +167,22 @@ typedef NS_ENUM(NSUInteger, CustomVariableScope)
*/
@property (nonatomic, assign) BOOL isAnonymizationEnabled;

/**
* Provides on-demand control of the SessionHash feature.
*
* - 'sh' parameter will be set to 0 when disabled
*
* - 'sh' parameter will be set to 1 when enabled
*
* - 'sh' parameter will not be set when notSet. Processing service will default to the current value from the Privacy tab in global or app settings.
*
* Default value is set to disabled.
*
* PIWIK PRO SDK will persist the parameter and hold the state next time the SDK is initialised.
*/

@property (nonatomic, assign) SessionHash sessionHash;

/**
Traffic source name.
Default value is "ios".
Expand Down Expand Up @@ -438,6 +466,24 @@ typedef NS_ENUM(NSUInteger, CustomVariableScope)
*/
- (BOOL)sendCampaign:(NSString *)campaignURLString NS_SWIFT_NAME(sendCampaign(url:));

/**
The method sets the visitorID provided in the deep link as parameter pk_vid.
@param deepLink A custom app URL containing pk_vid parameter
@return YES if the visitor ID is successfully set, NO otherwise or when it is nothing to set
*/
- (BOOL) setVisitorIdFromDeepLink: (nullable NSString *)deepLink
NS_SWIFT_NAME(setVisitorIdFrom(deepLink:));

/**
The method sets the visitorID provided in the deep link as parameter pk_vid.
@param url A custom app URL containing pk_vid parameter
@return YES if the visitor ID is successfully set, NO otherwise or when it is nothing to set
*/

- (BOOL) setVisitorIdFromURL: (nullable NSURL *)url
NS_SWIFT_NAME(setVisitorIdFrom(url:));
/**
Track how often a specific ad or banner is displayed in the app.
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ typedef NS_ENUM(NSUInteger, CustomVariableScope)
CustomVariableScopeAction NS_SWIFT_NAME(action),
};

typedef NS_ENUM(NSUInteger, SessionHash)
{
Disabled NS_SWIFT_NAME(disabled),
Enabled NS_SWIFT_NAME(enabled),
NotSet NS_SWIFT_NAME(notSet),
};

//MARK: - Tracker instance

/**
Expand Down Expand Up @@ -122,6 +129,11 @@ typedef NS_ENUM(NSUInteger, CustomVariableScope)
*/
@property (nonnull, nonatomic, readonly) NSString *visitorID;

/**
* Internal user agent used for data transmission between the Piwik Pro SDK and the Tracker.
*/
@property (nonnull, nonatomic, readonly) NSString *userAgent;

/**
The device ID is used to track the IDFA (identifier for advertising). IDFA is an additional non empty unique string identifying the device. If you want to use IDFA for tracking then you should set this property to IDFA by yourself (by default it is nil). You can read IDFA from the device as below:
Expand Down Expand Up @@ -155,6 +167,22 @@ typedef NS_ENUM(NSUInteger, CustomVariableScope)
*/
@property (nonatomic, assign) BOOL isAnonymizationEnabled;

/**
* Provides on-demand control of the SessionHash feature.
*
* - 'sh' parameter will be set to 0 when disabled
*
* - 'sh' parameter will be set to 1 when enabled
*
* - 'sh' parameter will not be set when notSet. Processing service will default to the current value from the Privacy tab in global or app settings.
*
* Default value is set to disabled.
*
* PIWIK PRO SDK will persist the parameter and hold the state next time the SDK is initialised.
*/

@property (nonatomic, assign) SessionHash sessionHash;

/**
Traffic source name.
Default value is "ios".
Expand Down Expand Up @@ -438,6 +466,24 @@ typedef NS_ENUM(NSUInteger, CustomVariableScope)
*/
- (BOOL)sendCampaign:(NSString *)campaignURLString NS_SWIFT_NAME(sendCampaign(url:));

/**
The method sets the visitorID provided in the deep link as parameter pk_vid.
@param deepLink A custom app URL containing pk_vid parameter
@return YES if the visitor ID is successfully set, NO otherwise or when it is nothing to set
*/
- (BOOL) setVisitorIdFromDeepLink: (nullable NSString *)deepLink
NS_SWIFT_NAME(setVisitorIdFrom(deepLink:));

/**
The method sets the visitorID provided in the deep link as parameter pk_vid.
@param url A custom app URL containing pk_vid parameter
@return YES if the visitor ID is successfully set, NO otherwise or when it is nothing to set
*/

- (BOOL) setVisitorIdFromURL: (nullable NSURL *)url
NS_SWIFT_NAME(setVisitorIdFrom(url:));
/**
Track how often a specific ad or banner is displayed in the app.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit b90879e

Please sign in to comment.