Skip to content
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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
CHANGELOG.md
packages/types/src/config
7 changes: 6 additions & 1 deletion packages/enums/src/goal-data-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
export enum GoalDataKey {
AMOUNT = 'amount',
PRODUCTS_COUNT = 'productsCount',
TRANSACTION_ID = 'transactionId'
TRANSACTION_ID = 'transactionId',
CUSTOM_DIMENSION_1 = 'customDimension1',
CUSTOM_DIMENSION_2 = 'customDimension2',
CUSTOM_DIMENSION_3 = 'customDimension3',
CUSTOM_DIMENSION_4 = 'customDimension4',
CUSTOM_DIMENSION_5 = 'customDimension5'
}
4 changes: 4 additions & 0 deletions packages/js-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,15 @@ The SDK instance can be initialized by either providing an `sdkKey` or a full pr

Include `sdkKey` as a string property in the options object you pass to the constructor instance. The SDK will fetch the project configuration from Convert's CDN and will then refresh it every `dataRefreshInterval` milliseconds.

> Note: if you use an authenticated key, then you need to include `sdkKeySecret` as a string property.

```typescript
import type {ConvertInterface, ConvertConfig} from '@convertcom/js-sdk';
import ConvertSDK from '@convertcom/js-sdk';

const convertSDK: ConvertInterface = new ConvertSDK({
sdkKey: 'xxx',
sdkKeySecret: 'xxx', // required when using an authenticated SDK key
dataRefreshInterval: 300000, // in milliseconds (5 minutes)
environment: 'staging' // can also be "live"; this is configured in the Convert UI.
} as ConvertConfig);
Expand Down Expand Up @@ -267,6 +270,7 @@ import {LogLevel} from '@convertcom/js-sdk';

const config = {
sdkKey: '', // either this or 'data' has to be provided
sdkKeySecret: '', // required when using an authenticated SDK key
environment: 'staging',
logger: {
logLevel: LogLevel.DEBUG,
Expand Down
Loading