Skip to content

Commit

Permalink
Merge pull request #81 from qonversion/release/1.1.1
Browse files Browse the repository at this point in the history
Release 1.1.1
  • Loading branch information
SpertsyanKM authored Oct 16, 2024
2 parents f41b964 + 93144a4 commit ef8d613
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fastlane/report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@



<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000499">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000201">

</testcase>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@qonversion/web-sdk",
"title": "Qonversion Web SDK",
"version": "1.1.0",
"version": "1.1.1",
"description": "Qonversion provides full in-app purchases infrastructure, so you do not need to build your own server for receipt validation. Implement in-app subscriptions, validate user receipts, check subscription status, and provide access to your app features and content using our Stripe wrapper, StoreKit wrapper and Google Play Billing wrapper.",
"main": "sdk/build/index.js",
"types": "sdk/build/index.d.ts",
Expand Down
10 changes: 10 additions & 0 deletions sdk/src/UserPropertiesBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ export class UserPropertiesBuilder {
return this;
}

/**
* Set Tenjin analytics installation id.
* @param id Tenjin analytics installation id
* @return builder instance for chain calls
*/
setTenjinAnalyticsInstallationId(id: string): UserPropertiesBuilder {
this.properties[UserPropertyKey.TenjinAnalyticsInstallationId] = id;
return this;
}

/**
* Set a user property with a custom key different from defined ones.
*
Expand Down
12 changes: 12 additions & 0 deletions sdk/src/__tests__/UserPropertiesBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@ describe('UserPropertiesBuilder tests', () => {
expect(builder['properties']).toStrictEqual(expProperties);
});

test('set Tenjin analytics installation id', () => {
// given
const id = "test Tenjin analytics installation id";
const expProperties = {'_q_tenjin_aiid': id};

// when
builder.setTenjinAnalyticsInstallationId(id);

// then
expect(builder['properties']).toStrictEqual(expProperties);
});

test('set custom user property', () => {
// given
const key = "test key";
Expand Down
1 change: 1 addition & 0 deletions sdk/src/dto/UserPropertyKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export enum UserPropertyKey {
AppMetricaUserProfileId = "_q_appmetrica_user_profile_id",
PushWooshHwId = "_q_pushwoosh_hwid",
PushWooshUserId = "_q_pushwoosh_user_id",
TenjinAnalyticsInstallationId = "_q_tenjin_aiid",
Custom = "",
}

0 comments on commit ef8d613

Please sign in to comment.